client-core: port the transcript fold (events into rows)
Ports the non-Compose half of app/.../TranscriptItems.kt (TranscriptItem, foldEvent, runIdFor, settleReply, placePeerNote, splitRun) and ToolRows.kt (TranscriptRow, groupToolRuns) into transcript_fold.rs, with 7 tests covering delta accumulation, settling, tool-run grouping, a ToolEnd with no matching start, and a question attaching to its call's row versus drawing its own. Not ported: TranscriptUnits.kt's flatten of a row into bounded Compose list units (a fact about that UI framework, not the transcript), and joinPages/healSplitMessage/adoptRun (page-boundary healing) -- both recorded in CLIENT_CORE.md as left for whoever picks this up next. Also noted there: event_model::Event has no Unknown catch-all, so an event type this build doesn't recognise fails to parse rather than degrading to a placeholder row, unlike Events.kt's hand-kept mirror. cargo test (85 passed), clippy --all-targets and fmt clean. Co-Authored-By: Claude Sonnet <noreply@anthropic.com>
This commit is contained in:
1 parent
e8dbcaa7db
commit
237886c11e
2 files changed
+828
No files matched your search
@@ -8,5 +8,6 @@ pub mod event_stream;
|
||||
pub mod highlight;
|
||||
pub mod sse;
|
||||
pub mod transcript_cache;
|
||||
pub mod transcript_fold;
|
||||
|
||||
pub use event_model::*;
|
||||
Reference in new issue
Block a user