pub struct TranscriptEntry {
pub uuid: String,
pub parent_uuid: Option<String>,
pub session_id: String,
pub timestamp: String,
pub entry_type: String,
pub is_sidechain: bool,
pub message: Option<TranscriptMessage>,
pub cwd: Option<String>,
pub git_branch: Option<String>,
pub version: Option<String>,
pub slug: Option<String>,
pub tool_use_result: Option<Value>,
}Expand description
A single entry in a Claude Code transcript JSONL file.
Fields§
§uuid: StringUnique identifier for this entry
parent_uuid: Option<String>Links to previous entry (for conversation tree)
session_id: StringSession identifier
timestamp: StringEntry timestamp (ISO 8601)
entry_type: StringEntry type: “user” or “assistant”
is_sidechain: boolWhether this is a sidechain request (subagent/auxiliary) CRITICAL for context size tracking - only main chain counts
message: Option<TranscriptMessage>Message content
cwd: Option<String>Working directory
git_branch: Option<String>Git branch
version: Option<String>Claude Code version
slug: Option<String>Human-readable session slug
tool_use_result: Option<Value>Tool use result (for user entries with tool results)
Implementations§
Source§impl TranscriptEntry
impl TranscriptEntry
Sourcepub fn into_events(
self,
machine_id: &str,
tool_info_map: &mut ToolInfoMap,
) -> Vec<Event>
pub fn into_events( self, machine_id: &str, tool_info_map: &mut ToolInfoMap, ) -> Vec<Event>
Convert this transcript entry to Event(s).
A single entry may produce multiple events:
- Assistant message with usage → ApiRequest
- User message → UserPromptSubmit
- Tool use blocks → PreToolUse events
- Tool result blocks → PostToolUse events
The tool_info_map is used to track tool_use_id → (tool_name, input) mappings
across entries, so that PostToolUse events can include the tool name and command.
Sourcepub fn should_skip(&self) -> bool
pub fn should_skip(&self) -> bool
Check if this entry should be skipped (non-conversation data).
Trait Implementations§
Source§impl Clone for TranscriptEntry
impl Clone for TranscriptEntry
Source§fn clone(&self) -> TranscriptEntry
fn clone(&self) -> TranscriptEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more