pub struct Transcript { /* private fields */ }Expand description
The transcript model.
Implementations§
Source§impl Transcript
impl Transcript
Sourcepub const fn is_streaming(&self) -> bool
pub const fn is_streaming(&self) -> bool
Whether an assistant message is streaming.
Sourcepub fn push_notice(
&mut self,
level: NoticeLevel,
text: impl Into<String>,
) -> RowId
pub fn push_notice( &mut self, level: NoticeLevel, text: impl Into<String>, ) -> RowId
Adds a notice line.
Sourcepub fn reset_from_entries(
&mut self,
entries: &[SessionEntry],
leaf: Option<&str>,
)
pub fn reset_from_entries( &mut self, entries: &[SessionEntry], leaf: Option<&str>, )
Rebuilds from session entries the way renderInitialMessages does: the context
entries of the branch ending at leaf (latest compaction honoured), custom entries
included.
Sourcepub fn apply(&mut self, event: &AgentSessionEvent) -> Applied
pub fn apply(&mut self, event: &AgentSessionEvent) -> Applied
Applies one session event (handleEvent chat-container effects).
Sourcepub fn begin_bash(
&mut self,
request_id: Option<String>,
command: impl Into<String>,
exclude_from_context: bool,
) -> RowId
pub fn begin_bash( &mut self, request_id: Option<String>, command: impl Into<String>, exclude_from_context: bool, ) -> RowId
Starts a ! command row (frontend-initiated; output streams via
Transcript::bash_delta).
Sourcepub fn bash_delta(&mut self, request_id: Option<&str>, delta: &str) -> bool
pub fn bash_delta(&mut self, request_id: Option<&str>, delta: &str) -> bool
Appends streamed output of a running ! command.
Sourcepub fn finish_bash(
&mut self,
request_id: Option<&str>,
outcome: BashOutcome,
) -> bool
pub fn finish_bash( &mut self, request_id: Option<&str>, outcome: BashOutcome, ) -> bool
Completes a ! command row.
Sourcepub fn fail_bash(&mut self, request_id: Option<&str>, error: &str) -> bool
pub fn fail_bash(&mut self, request_id: Option<&str>, error: &str) -> bool
Marks a running ! command row as failed with error.
Sourcepub fn last_assistant_text(&self) -> Option<String>
pub fn last_assistant_text(&self) -> Option<String>
Text of the last finished assistant message.
Sourcepub fn user_texts(&self) -> Vec<String>
pub fn user_texts(&self) -> Vec<String>
Texts of user rows in order (editor history seed, populateHistory).
Trait Implementations§
Source§impl Clone for Transcript
impl Clone for Transcript
Source§impl Debug for Transcript
impl Debug for Transcript
Auto Trait Implementations§
impl Freeze for Transcript
impl RefUnwindSafe for Transcript
impl Send for Transcript
impl Sync for Transcript
impl Unpin for Transcript
impl UnsafeUnpin for Transcript
impl UnwindSafe for Transcript
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more