Skip to main content

TranscriptView

Struct TranscriptView 

Source
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

Source

pub fn new(chat: Arc<Container>) -> Self

Self-contained view owning fresh maps (the remote client).

Source

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>>>, message_seq: MessageIdSeq, ) -> 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.

Source

pub fn with_show_images(self, show: bool) -> Self

Configure image visibility for newly created assistant components.

Source

pub fn add_user(&self, text: &str)

Append a user prompt bubble.

Source

pub fn add_notice(&self, text: &str)

Append a dim one-line notice (retry / error / command feedback).

Source

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.

Source

pub fn set_expanded(&self, expanded: bool)

Set the global tool-output expansion preference and re-apply it to every live panel.

Source

pub fn toggle_expanded(&self) -> bool

Flip the expansion preference; returns the new value.

Source

pub fn expanded(&self) -> bool

Whether tool outputs are currently expanded.

Source

pub fn set_hide_thinking(&self, hide: bool)

Hide/show thinking blocks on the in-flight assistant message.

Source

pub fn toggle_message_thinking(&self, id: &str) -> bool

Flip one assistant message’s thinking between the collapsed label and the full body. None when id is stale (the message scrolled out of the live container and its component is gone) — the click is then left for the selection tracker.

Source

pub fn next_message_id(&self) -> String

The id every NEW assistant message gets, so the host can route a click-region hit before knowing which component backs it.

Source

pub fn toggle_hide_thinking(&self) -> bool

Flip the thinking-visibility preference; returns the new value.

Source

pub fn hide_thinking(&self) -> bool

Whether thinking blocks are currently hidden.

Source

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).

Source

pub fn finalize_assistant(&self)

Finalize any still-streaming assistant panel (used at turn/run end).

Source

pub fn finalize_assistant_blocks(&self, blocks: &[AssistantBlock])

Finalize the assistant panel with an authoritative final block list.

Source

pub fn has_running_tool(&self) -> bool

Whether any tool panel is still running (drives the local render tick).

Source

pub fn has_active_bash(&self) -> bool

Whether a bash panel is currently on screen.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> MaybeSendSync for T

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more