Victor Lowther
bbf779e691
fix(tui): make reasoning stream rendering linear (coalesced deltas, O(1) append, tail-bounded preview) ( #1198 )
...
* feat(tui): coalesce reasoning deltas with kind-switch flush
Extend the stream coalescer to batch agentReasoningMsg deltas alongside
assistant-text at ~60fps, flushing on kind switches so interleaved
prose and reasoning never reorder. Fixes the O(n^2) re-render
pathology where each thinking delta re-rendered the whole accumulated
block.
* perf(tui): make reasoning stream append and preview rendering O(1) per delta
streamingReasoning accumulated with string += delta, the same O(n^2)
append pathology that streamingText had already been migrated away
from for. Switch it to []byte so each reasoning delta is an amortized
O(1) append, read through streamingReasoningString().
The live preview also paid per-frame costs on the growing string:
reasoningPreviewLines split the entire accumulated reasoning to show
the last two lines, and previewTail rune-converted whole lines. Both
now walk backwards over only the tail they render, so preview cost is
bounded by the visible width instead of segment length.
* fix(tui): clear fired coalescer timer so later deltas re-arm and never stall
* fix(tui): normalize invalid UTF-8 in truncated reasoning preview tail
2026-11-09 13:29:28 +08:00
..
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-22 06:52:51 -07:00
2026-08-19 22:18:47 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-22 06:52:51 -07:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-11-07 10:28:29 -08:00
2026-11-09 13:29:28 +08:00
2026-06-20 19:40:32 +05:30
2026-08-07 20:17:19 +08:00
2026-06-17 11:53:39 +05:30
2026-10-17 07:13:21 +08:00
2026-11-09 13:29:28 +08:00
2026-11-09 13:29:28 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-20 18:57:20 +05:30
2026-10-17 07:13:21 +08:00
2026-08-10 10:51:11 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-22 06:52:51 -07:00
2026-10-12 09:23:37 +08:00
2026-07-05 13:15:14 +05:30
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-08-28 10:27:33 +05:30
2026-10-17 07:13:21 +08:00
2026-10-12 09:55:24 +08:00
2026-08-15 17:54:38 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-18 19:42:29 +05:30
2026-07-05 13:15:14 +05:30
2026-10-17 07:13:21 +08:00
2026-11-07 10:28:29 -08:00
2026-10-17 07:13:21 +08:00
2026-11-07 10:28:29 -08:00
2026-11-07 10:28:29 -08:00
2026-11-07 10:28:29 -08:00
2026-11-07 10:28:29 -08:00
2026-10-15 15:33:32 +08:00
2026-11-07 10:28:29 -08:00
2026-11-07 10:28:29 -08:00
2026-11-07 10:28:29 -08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-14 17:54:00 +05:30
2026-10-22 06:52:51 -07:00
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-07-03 22:50:44 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-20 23:12:15 +05:30
2026-10-17 07:13:21 +08:00
2026-07-01 21:25:47 +05:30
2026-06-16 19:04:38 +05:30
2026-07-28 17:51:28 +08:00
2026-08-19 22:18:47 +05:30
2026-08-19 22:18:47 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-23 10:51:47 +05:30
2026-08-19 22:18:47 +05:30
2026-08-19 22:18:47 +05:30
2026-10-17 07:13:21 +08:00
2026-07-06 11:42:46 +08:00
2026-07-27 09:59:33 +08:00
2026-07-05 13:15:14 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-16 19:04:38 +05:30
2026-06-13 22:20:42 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-16 19:04:38 +05:30
2026-06-16 14:48:12 +05:30
2026-10-17 07:13:21 +08:00
2026-08-11 09:24:06 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-07-02 23:29:12 +08:00
2026-10-22 06:52:51 -07:00
2026-11-09 13:29:28 +08:00
2026-08-11 09:24:06 +08:00
2026-08-11 09:24:06 +08:00
2026-08-10 09:57:44 +08:00
2026-06-18 19:42:29 +05:30
2026-11-09 13:29:28 +08:00
2026-11-07 10:28:29 -08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-07-05 13:15:14 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-07-05 13:15:14 +05:30
2026-11-09 11:56:14 +08:00
2026-11-09 11:56:14 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-10-15 15:33:32 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-11-02 14:25:00 +08:00
2026-11-09 11:56:14 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-07-13 22:18:55 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-21 18:21:31 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-22 06:52:51 -07:00
2026-10-17 07:13:21 +08:00
2026-06-17 12:41:20 +05:30
2026-10-17 07:13:21 +08:00
2026-07-05 13:15:14 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-11-07 10:28:29 -08:00
2026-11-07 10:28:29 -08:00
2026-06-21 13:25:17 +05:30
2026-08-11 09:24:06 +08:00
2026-10-17 07:13:21 +08:00
2026-06-18 12:03:10 +05:30
2026-07-20 10:20:46 +08:00
2026-06-28 13:41:00 +05:30
2026-06-16 19:04:38 +05:30
2026-10-12 09:28:11 +08:00
2026-06-16 19:04:38 +05:30
2026-07-24 09:04:41 +08:00
2026-10-17 07:13:21 +08:00
2026-11-07 10:28:29 -08:00
2026-10-17 07:13:21 +08:00
2026-08-09 18:12:09 +05:30
2026-11-07 10:28:29 -08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-06-20 22:21:48 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-07-05 19:36:17 +08:00
2026-06-25 20:23:29 +05:30
2026-10-17 07:13:21 +08:00
2026-07-16 23:02:22 +08:00
2026-07-24 09:04:41 +08:00
2026-07-24 08:48:16 +08:00
2026-06-28 13:41:00 +05:30
2026-07-24 09:04:41 +08:00
2026-07-01 13:55:35 +05:30
2026-08-19 22:18:47 +05:30
2026-06-28 13:41:00 +05:30
2026-08-19 22:18:47 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-06-19 20:35:08 +05:30
2026-10-17 07:13:21 +08:00
2026-10-12 09:55:24 +08:00
2026-11-07 10:28:29 -08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-08-19 22:18:47 +05:30
2026-08-19 22:18:47 +05:30
2026-08-19 22:18:47 +05:30
2026-11-07 10:28:29 -08:00
2026-10-12 09:55:24 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-08-25 20:23:48 +08:00
2026-08-19 22:18:47 +05:30
2026-06-17 09:01:50 +05:30
2026-11-09 13:29:28 +08:00
2026-06-19 21:11:34 +05:30
2026-07-05 13:15:14 +05:30
2026-07-05 13:15:14 +05:30
2026-07-20 10:20:46 +08:00
2026-11-09 13:29:28 +08:00
2026-10-17 07:13:21 +08:00
2026-08-19 22:18:47 +05:30
2026-06-16 23:40:32 +05:30
2026-07-24 09:04:41 +08:00
2026-10-17 07:13:21 +08:00
2026-08-26 13:22:05 +08:00
2026-09-12 08:44:43 +08:00
2026-10-17 07:13:21 +08:00
2026-07-30 17:03:27 +05:30
2026-07-01 09:15:08 +05:30
2026-06-20 23:12:15 +05:30
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-17 07:13:21 +08:00
2026-10-12 09:55:24 +08:00
2026-08-19 22:18:47 +05:30
2026-11-09 13:29:28 +08:00
2026-06-20 10:52:01 +05:30