diff options
| author | Adam Malczewski <[email protected]> | 2026-06-22 14:18:56 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-22 14:18:56 +0900 |
| commit | b3c830237206a319348a0eb7078b49e20f60883b (patch) | |
| tree | 2eab38e02b5e0ab209185a92e3ac60f54ea56415 /src/features/chat/ui/ChatView.svelte | |
| parent | 4e1d041c0ee34fa1b74b0d5ecbd432cdacf696e9 (diff) | |
| download | dispatch-web-b3c830237206a319348a0eb7078b49e20f60883b.tar.gz dispatch-web-b3c830237206a319348a0eb7078b49e20f60883b.zip | |
fix: trim provisional chunks during long turns (browser stays responsive)
trimTranscript now drops oldest provisional chunks (the in-flight turn)
when committed chunks are exhausted. Previously it bailed with drop=0
when committed was empty, allowing unbounded provisional growth during
long generating turns (300+ chunks → browser crawls).
Root cause of the syncTail approach failing: the kernel emits
step-complete (line 360) BEFORE calling onStepComplete (line 542) —
chunks are persisted only after tool results come back, not when
step-complete fires. So syncTail on step-complete found nothing.
Reverted the applyHistory + syncTail-on-step-complete changes from
4e1d041. The new approach is simpler: trim provisional directly in
trimTranscript. Dropped chunks are lost temporarily (no Show Earlier)
but come back as committed when the turn seals and syncTail fetches
everything from the server.
686 tests green.
Diffstat (limited to 'src/features/chat/ui/ChatView.svelte')
0 files changed, 0 insertions, 0 deletions
