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:
Eyejoker
2026-03-23 19:22:14 +09:00
parent 83df0e7dc1
commit be9dfa64b0
2 changed files with 36 additions and 20 deletions

View File

@@ -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) {