fix: deduplicate progress at runner level, not host revert
Buffer intermediate assistant text in the runner. When result arrives with matching text, discard the buffered progress instead of emitting it. This prevents the duplicate from ever reaching Discord, eliminating the flash-then-revert behavior.
This commit is contained in:
@@ -154,18 +154,6 @@ export class MessageTurnController {
|
||||
// then discard the pending buffer so it never shows up.
|
||||
if (text) {
|
||||
await this.flushPendingProgress(text);
|
||||
// If the displayed progress heading matches the final text,
|
||||
// revert to the previous heading so it doesn't show twice.
|
||||
if (
|
||||
this.latestProgressText === text &&
|
||||
this.previousProgressText &&
|
||||
this.progressMessageId &&
|
||||
this.options.channel.editMessage
|
||||
) {
|
||||
this.latestProgressText = this.previousProgressText;
|
||||
this.toolActivities = [];
|
||||
await this.syncTrackedProgressMessage();
|
||||
}
|
||||
await this.finalizeProgressMessage();
|
||||
await this.deliverFinalText(text);
|
||||
} else if (raw) {
|
||||
|
||||
Reference in New Issue
Block a user