Skip to main content

Module turns

Module turns 

Source
Expand description

Where a turn starts in a Claude stream-json transcript.

Functions§

is_claude_turn_start
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).