Skip to main content

is_claude_turn_start

Function is_claude_turn_start 

Source
pub(crate) fn is_claude_turn_start(line: &str) -> bool
Expand description

Whether line starts a turn in a Claude stream-json transcript: the same rule as the frontend’s ClaudeTranslator.handleUserMessage producing a user_message — a user record whose content is a non-empty string, or an array with an image and some text and no tool_result (a text-only array is how the CLI records “[Request interrupted by user]” and other meta lines, never rendered as a turn).