fix: remove duplicate suppression that swallowed final output

The alreadyVisible check compared progress text with final text and
skipped deliverFinalText when they matched. This caused legitimate
final outputs to vanish when the progress message happened to
accumulate the same text through edits.
This commit is contained in:
Eyejoker
2026-03-30 01:39:02 +09:00
parent aa6477cf2b
commit 1e9e69ed23

View File

@@ -264,19 +264,9 @@ export class MessageTurnController {
// Final arrived — flush any buffered progress that isn't the same text,
// then discard the pending buffer so it never shows up.
if (text) {
// If the progress message already shows the same text as the final
// result, finalize it in-place instead of sending a duplicate message.
const alreadyVisible =
this.progressMessageId && this.latestProgressText === text;
if (alreadyVisible) {
await this.finalizeProgressMessage();
this.visiblePhase = toVisiblePhase(phase);
this.latestProgressTextForFinal = null;
} else {
await this.flushPendingProgress(text);
await this.finalizeProgressMessage();
await this.deliverFinalText(text);
}
await this.flushPendingProgress(text);
await this.finalizeProgressMessage();
await this.deliverFinalText(text);
} else if (silentOutput || suppressState !== 'none') {
const shouldPromoteVisibleProgressToFinal =
this.visiblePhase === 'progress' &&