pub struct TranscriptView { /* private fields */ }Expand description
The retained transcript: the same component maps the local TuiState holds,
so a streaming assistant message and each tool/bash panel are updated in
place rather than rebuilt per event.
Implementations§
Source§impl TranscriptView
impl TranscriptView
Sourcepub fn new(chat: Arc<Container>) -> Self
pub fn new(chat: Arc<Container>) -> Self
Self-contained view owning fresh maps (the remote client).
Sourcepub fn with_maps(
chat: Arc<Container>,
current_assistant: Arc<Mutex<Option<Arc<AssistantMessageComponent>>>>,
tool_components: Arc<Mutex<HashMap<String, Arc<ToolExecutionComponent>>>>,
bash_components: Arc<Mutex<HashMap<String, Arc<BashExecutionComponent>>>>,
hide_thinking: Arc<Mutex<bool>>,
expanded: Arc<Mutex<bool>>,
markdown_transformer: Arc<Mutex<Option<MarkdownTransformer>>>,
) -> Self
pub fn with_maps( chat: Arc<Container>, current_assistant: Arc<Mutex<Option<Arc<AssistantMessageComponent>>>>, tool_components: Arc<Mutex<HashMap<String, Arc<ToolExecutionComponent>>>>, bash_components: Arc<Mutex<HashMap<String, Arc<BashExecutionComponent>>>>, hide_thinking: Arc<Mutex<bool>>, expanded: Arc<Mutex<bool>>, markdown_transformer: Arc<Mutex<Option<MarkdownTransformer>>>, ) -> Self
Wrap shared component maps. The local host keeps direct Arc handles
to these maps for its render-tick, reload and toggle logic, so it hands
the same handles to the view instead of duplicating them.
Sourcepub fn with_show_images(self, show: bool) -> Self
pub fn with_show_images(self, show: bool) -> Self
Configure image visibility for newly created assistant components.
Sourcepub fn add_notice(&self, text: &str)
pub fn add_notice(&self, text: &str)
Append a dim one-line notice (retry / error / command feedback).
Sourcepub fn apply(&self, event: &UiEvent, width: usize)
pub fn apply(&self, event: &UiEvent, width: usize)
Fold one normalized event into the retained components. width is the
current terminal width, used to render edit diffs.
Sourcepub fn set_expanded(&self, expanded: bool)
pub fn set_expanded(&self, expanded: bool)
Set the global tool-output expansion preference and re-apply it to every live panel.
Sourcepub fn toggle_expanded(&self) -> bool
pub fn toggle_expanded(&self) -> bool
Flip the expansion preference; returns the new value.
Sourcepub fn set_hide_thinking(&self, hide: bool)
pub fn set_hide_thinking(&self, hide: bool)
Hide/show thinking blocks on the in-flight assistant message.
Sourcepub fn toggle_hide_thinking(&self) -> bool
pub fn toggle_hide_thinking(&self) -> bool
Flip the thinking-visibility preference; returns the new value.
Sourcepub fn hide_thinking(&self) -> bool
pub fn hide_thinking(&self) -> bool
Whether thinking blocks are currently hidden.
Sourcepub fn set_markdown_transformer(&self, transformer: Option<MarkdownTransformer>)
pub fn set_markdown_transformer(&self, transformer: Option<MarkdownTransformer>)
Install (or clear) the assistant-markdown transformer, re-applying it to the in-flight assistant message immediately (mirrors the local reload).
Sourcepub fn finalize_assistant(&self)
pub fn finalize_assistant(&self)
Finalize any still-streaming assistant panel (used at turn/run end).
Sourcepub fn finalize_assistant_blocks(&self, blocks: &[AssistantBlock])
pub fn finalize_assistant_blocks(&self, blocks: &[AssistantBlock])
Finalize the assistant panel with an authoritative final block list.
Sourcepub fn has_running_tool(&self) -> bool
pub fn has_running_tool(&self) -> bool
Whether any tool panel is still running (drives the local render tick).
Sourcepub fn has_active_bash(&self) -> bool
pub fn has_active_bash(&self) -> bool
Whether a bash panel is currently on screen.