pub struct OpenCodeTranscript { /* private fields */ }Expand description
One OpenCode session as a SessionSummary, read from the database.
There is nothing to tail: each refresh re-reads the session row (and its
subagent rows and tool parts) and rebuilds the summary. A cheap check on
the session’s time_updated skips the part scan when nothing changed, so a
stopped session costs one small query per tick.
Implementations§
Source§impl OpenCodeTranscript
impl OpenCodeTranscript
pub fn new(virtual_path: &Path, retention: SpanRetention) -> Self
Trait Implementations§
Source§impl SessionTracker for OpenCodeTranscript
impl SessionTracker for OpenCodeTranscript
Source§fn refresh(&mut self) -> Result<bool>
fn refresh(&mut self) -> Result<bool>
Ingest whatever was appended since the last call. Returns true when
there is still unread data (the byte budget was exhausted).
fn summary(&self) -> &SessionSummary
fn path(&self) -> &Path
Source§fn refresh_all(&mut self) -> Result<()>
fn refresh_all(&mut self) -> Result<()>
Ingest the whole file, however many refreshes that takes. For a
one-shot read such as an export; the live collector spreads a large
transcript over several ticks instead.
Auto Trait Implementations§
impl !Freeze for OpenCodeTranscript
impl !RefUnwindSafe for OpenCodeTranscript
impl !Sync for OpenCodeTranscript
impl !UnwindSafe for OpenCodeTranscript
impl Send for OpenCodeTranscript
impl Unpin for OpenCodeTranscript
impl UnsafeUnpin for OpenCodeTranscript
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