feat(web): show native context compaction activity in chat

This commit is contained in:
2026-10-20 22:15:03 +01:00
parent aa57fe8a04
commit d8b111913e
9 changed files with 216 additions and 11 deletions
+9
View File
@@ -336,6 +336,15 @@ history refresh without inventing text deltas or ending a queued prompt. Native
step markers may include `step.turn_id`; a terminal marker for an older turn
must not clear a newer turn's Stop control or release its queue slot.
Native context compaction is reported as `chat_event.kind="compaction"`, with
`compaction: {status: "running" | "completed" | "failed", id?: string}`.
This is session activity and may have no `message_id`: clients must not invent
an assistant message or tool call for it. Show **Compacting context…** while
running; completion clears that phase but does not itself end the model turn.
A new subscriber receives any retained active compaction. Clear stale activity
before reconnecting, then preserve fresh replayed activity while history loads.
This reports native observations only; it does not request or trigger compaction.
The brokered OpenCode chat exposes the operator's own sessions, separate from the
sessions pipeline runs create. The protocol types are: