singularity-forge/packages/pi-coding-agent/src
Jeremy c8c416802f fix(tui): render assistant tool calls inline with text instead of grouped at end
Previously the chat-controller created one AssistantMessageComponent per
assistant message and removed/re-appended it to the chat container's tail
on every tool block, forcing all narration after every tool execution
regardless of stream order. Users had to scroll up to read text that was
written before each tool call.

Replace the reorder hack with a stream-order segment walker that walks
content[] left-to-right, collapses contiguous text/thinking blocks into
text-run segments, emits one segment per tool block, and append-only adds
new segments to chatContainer. AssistantMessageComponent gains a
ContentRange API so a single message can spawn multiple text-run
components, plus a separate showMetadata flag so timestamp/error footers
render only on the trailing segment without duplicating earlier text.

Adds a regression test that streams [text, tool, text, tool, text] and
asserts both interleaved order and per-segment rendered text content.

Closes #4144
2026-04-13 17:23:17 -05:00
..
cli feat: Wire --bare mode across headless → pi-coding-agent → resource-loa… 2026-03-26 11:39:25 -06:00
core fix(tui): render assistant tool calls inline with text instead of grouped at end 2026-04-13 17:23:17 -05:00
modes fix(tui): render assistant tool calls inline with text instead of grouped at end 2026-04-13 17:23:17 -05:00
resources/extensions/memory refactor(test): replace try/finally with beforeEach/afterEach in packages tests (#2390) 2026-03-24 21:34:10 -06:00
tests fix: normalize Windows paths in LLM-visible text to prevent bash failures (#874) (#884) 2026-03-17 09:02:23 -06:00
utils fix(windows): prevent EINVAL by disabling detached process groups on Win32 (#2744) 2026-03-26 16:08:03 -06:00
cli.ts feat: vendor Pi source into workspace monorepo 2026-03-12 21:55:17 -06:00
config.ts refactor: remove dead code (unused exports) (#1486) 2026-03-19 15:33:32 -06:00
index.ts fix(auto): add structured cooldown error and bounded retry budget 2026-04-12 09:16:05 -05:00
main.ts feat: Wire --bare mode across headless → pi-coding-agent → resource-loa… 2026-03-26 11:39:25 -06:00
migrations.ts refactor: remove dead code (unused exports) (#1486) 2026-03-19 15:33:32 -06:00