fix(tui): stabilize live todo progress

This commit is contained in:
Brooklyn Nicholson 2026-04-26 15:55:38 -05:00
parent 1566f1eecc
commit f5552f92e2
14 changed files with 256 additions and 86 deletions

View file

@ -11,6 +11,7 @@ import { applyDelegationStatus, getDelegationState } from './delegationStore.js'
import type { GatewayEventHandlerContext } from './interfaces.js'
import { patchOverlayState } from './overlayStore.js'
import { turnController } from './turnController.js'
import { archiveDoneTodos } from './turnStore.js'
import { getUiState, patchUiState } from './uiStore.js'
const NO_PROVIDER_RE = /\bNo (?:LLM|inference) provider configured\b/i
@ -538,6 +539,7 @@ export function createGatewayEventHandler(ctx: GatewayEventHandlerContext): (ev:
if (!wasInterrupted) {
const msgs: Msg[] = finalMessages.length ? finalMessages : [{ role: 'assistant', text: finalText }]
msgs.forEach(appendMessage)
archiveDoneTodos().forEach(appendMessage)
if (bellOnComplete && stdout?.isTTY) {
stdout.write('\x07')