pub struct TranscriptLogger { /* private fields */ }Expand description
Appends voice transcript entries to a JSONL file.
Log files are stored at: {workspace}/.clawft/transcripts/{session_key}.jsonl
This logger is append-only and does not require locking for single-session use.
Implementations§
Source§impl TranscriptLogger
impl TranscriptLogger
Sourcepub fn new(workspace: &Path, session_id: &str) -> Result<Self>
pub fn new(workspace: &Path, session_id: &str) -> Result<Self>
Create a new logger for the given session.
Creates the transcript directory if it does not exist.
Sourcepub async fn log(&self, entry: &TranscriptEntry) -> Result<()>
pub async fn log(&self, entry: &TranscriptEntry) -> Result<()>
Append a transcript entry to the log file.
Sourcepub async fn read_all(&self) -> Result<Vec<TranscriptEntry>>
pub async fn read_all(&self) -> Result<Vec<TranscriptEntry>>
Read all entries from the log file.
Auto Trait Implementations§
impl Freeze for TranscriptLogger
impl RefUnwindSafe for TranscriptLogger
impl Send for TranscriptLogger
impl Sync for TranscriptLogger
impl Unpin for TranscriptLogger
impl UnsafeUnpin for TranscriptLogger
impl UnwindSafe for TranscriptLogger
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