mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-10-21 05:06:37 +00:00
fix(timeline): stop adding an empty agent marker after every tool step (#1058)
fix(timeline): stop adding an empty agent marker after every tool step In OpenCode V2 each agent step is its own assistant message, and most steps only call tools. The timeline's structural index for history knew an assistant message's tool and reasoning counts but not whether it had text, so the projection drew a tool marker followed by an agent marker for every step. For tool-only and reasoning-only steps that agent marker was empty: no hover preview, and clicking it reached a message showing nothing but its tools, or nothing when tools are hidden in Message content. Resident (loaded) messages already dropped such markers. The outline index now also counts an assistant message's non-blank text parts that are neither synthetic nor ignored, the same text the hover preview shows. The projection draws an assistant marker only when that count (or the resident segments) shows visible text, so a tool-only step keeps its tool marker alone and a reasoning-only step has none. The count is optional in the contract: an older plugin copy still loaded by the daemon reports no count, and its markers stay as before. Persisted indexes saved without the count display immediately and then revalidate every checkpoint once, like the representative tool names. The unused message-timeline-group-* classes, which no stylesheet or test referenced, are removed; the group spacing that still uses tool membership is kept. Validation: navigation.test covers text counts for text, tool-only and blank/synthetic/ignored/reasoning-only steps; session-outline-projection covers tool-only, reasoning-only, text, unknown-count, shell and resident cases; session-outline-persistence covers validation and the one-time refresh of indexes without counts; the native navigation script now asserts the counts on real native storage (CI). history-navigation, timeline-tool-filters, system-messages and render-cost browser tests, the session-outline tests and the UI typecheck pass.
This commit is contained in:
parent
310a91e52e
commit
f3c0fe671e
12 changed files with 67 additions and 28 deletions
|
|
@ -73,8 +73,12 @@ content-addressed leaves and no excerpts or message bodies. Limits are 16 indexe
|
|||
The optional data uses a separate budget from drafts, attachments and selections.
|
||||
Missing/corrupt index chunks discard only that index. Frozen normalized indexes
|
||||
and encoded leaves are memoized so draft/scroll captures do not rehash each entry.
|
||||
Indexes saved before representative tool names were added display immediately, then
|
||||
perform one complete checkpoint revalidation before being persisted again.
|
||||
Indexes saved before representative tool names or assistant text counts were added
|
||||
display immediately, then perform one complete checkpoint revalidation before being
|
||||
persisted again. The text count (non-blank text parts that are neither synthetic nor
|
||||
ignored) decides whether an assistant step gets its own marker: tool-only and
|
||||
reasoning-only steps are represented by their tool marker alone, like resident
|
||||
markers. An index from an older plugin copy has no count and keeps the marker.
|
||||
The `outline-index-v1` root extension fences older renderers rather than letting
|
||||
them discard session documents they cannot interpret. Hosts without partition
|
||||
support keep their existing monolithic snapshot without the optional indexes.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue