Skip to main content

Module transcript

Module transcript 

Source
Expand description

The conversation fold: wire messages in, where its turns sit out.

The fold walks the whole conversation in one pass and reports the message each turn opens at, which is what a page is cut on, plus the task endings it holds. The rules it folds by are not restated here: the row predicates it opens a turn by (forge_workspace::conversation_turns) are the ones the conversation window reads too, and the envelope parser (crate::envelope) is the one the read path uses.

Re-exportsΒ§

use std::collections::HashMap; πŸ”’
use forge_primitives::ContentBlock; πŸ”’
use forge_primitives::Message; πŸ”’
use forge_primitives::StopReason; πŸ”’
use forge_primitives::ToolCallStatus; πŸ”’
use forge_workspace::conversation_turns::claims_skill_call; πŸ”’
use forge_workspace::conversation_turns::forge_minted; πŸ”’
use forge_workspace::conversation_turns::is_continuation; πŸ”’
use forge_workspace::conversation_turns::is_dispatched; πŸ”’
use forge_workspace::conversation_turns::is_image_note; πŸ”’
use forge_workspace::conversation_turns::is_interrupt_marker; πŸ”’
use forge_workspace::conversation_turns::is_task_notice; πŸ”’
use crate::envelope::detect_inbound; πŸ”’

StructsΒ§

Rendered
A folded conversation: where its turns sit, and the endings it holds.
TaskEnding
What a persisted task ending says, which is what the live wire’s task_notification frame says: the CLI writes the frame’s fields as XML into the transcript instead.
TurnSpan
Where one turn sits in the conversation it was folded from, and what names it.
TurnTrace πŸ”’
The facts a turn’s own rows carry, gathered while the fold walks them.

FunctionsΒ§

answered_later πŸ”’
Whether any of open is answered later than from.
close_traced πŸ”’
Name the turn a transcript’s own rows support, then start the next turn’s trace. A turn the wire already settled is named by its own result frame and this one nothing, so the two never name one turn twice.
is_completion_notice πŸ”’
Whether a queued block is the harness’s background-completion notice rather than anything a person said.
name_open πŸ”’
Name the turn the fold has open, if it has one: the report that closed a turn is what names it.
notice_block πŸ”’
The notice as the block a view reads an ending from: the shape the scan hoists an attachment row into, so both carriers reach a client as one thing rather than as two the client has to know about.
notices_as_blocks πŸ”’
Every task notice the conversation holds as that one block, whichever carrier the CLI persisted it in.
open_turn πŸ”’
Open a turn, answering the span it opened: the one a page is cut on and the one a later report names.
queued_command_text
The text a queued_command block carries: a plain string for a typed prompt, or a content-block array for a multi-modal one, where only the text blocks are the words the user typed. An image or document is not text: a view draws it as an attachment row, from the block itself. Every other block renders as a [type] placeholder so the reader sees something rather than a blank.
render
Fold a conversation into where its turns sit in the message list, and the task endings it holds.
tag πŸ”’
The text between <name> and </name>, trimmed.
take_key πŸ”’
What names a settled row: the instant the turn’s own first row carried, which survives an insertion above it where a count of the rows before it does not.
task_ending πŸ”’
The ending a persisted notice carries, or None when the text is not one or names no call to end.
task_endings πŸ”’
Every task ending the conversation holds, by the call each names.
task_status πŸ”’
A task’s own status word, as the frame carrying it draws the call.