Skip to main content

Module digest

Module digest 

Source
Expand description

What a model is shown of a pane’s recent conversation: a bounded digest read from the block’s output file, with hidden memory-reinjection turns removed.

Structs§

RecentActivity
A block’s recent activity: the digest text, and how it ends.

Enums§

TurnEnding
How the newest exchange in a block’s recent activity ends. Decided in code, from the same entries the digest is built from, so a call that could only decline is never made.

Functions§

activity_from_entries
The recent activity a pane sent with its request: entries in the digest’s own form ([user] …, [assistant] …, [tool] Name, [error] …), oldest first, from the document it has already translated for its provider. Kept to the same caps and judged the same way as one read from the output file, and refused the same way while a hidden memory reinjection is in progress.
is_hidden_reinjection_active
read_recent_activity
read_recent_activity_digest’s digest, with how the newest exchange ends. Read from the agent’s zone in the global store when it has content, the block’s own store otherwise (TranscriptSource).
read_recent_activity_digest
Read the last 96 KB of a block’s FileStore output, extract digest entries from all of it, and keep the newest few (finalize_digest). Used directly by next_prompt_suggestion; activity_summary now only falls back to this when the caller didn’t supply user_message (see docs/specs/SPEC_AMBIENT_PANE_TITLE_OVERALL_GOAL_TRACKING_2026_08_17.md) — the common case passes the literal just-submitted text instead. Returns None when there’s nothing usable — callers should return an empty ambient result in that case without invoking the CLI.
read_recent_activity_from
read_recent_activity from a resolved source.
reads_output_format
Whether a block’s output can be read as a digest: Claude Code’s stream-json shape, which Qwen’s stream also has. Any other provider’s file reads as no conversation at all, so a caller that has only the file skips such a block instead of reading 96 KB of it to find nothing. A pane sends its own translated activity instead (activity_from_entries). agentOutputFormat is empty on blocks created before it was recorded, which were all Claude.
set_hidden_reinjection_active
Called once, at the moment an AgentInputCommand is dispatched for a block — hidden: true starts (or extends) that block’s suppression window; hidden: false (any ordinary user turn) ends it. The tool_result continuation frames a hidden turn’s own tool-using reply produces never go through this path (they’re the CLI’s own stdout, not a fresh RPC), so they can’t accidentally clear it either — the same class of bug finding #7 fixed for the byte-scanning heuristic doesn’t exist here by construction.