Skip to main content

classify

Function classify 

Source
pub fn classify(
    tools: &[&str],
    bash_cmds: &[&str],
    user_msg: Option<&str>,
    text_chars: u32,
) -> Activity
Expand description

Classify a single assistant turn.

Arguments:

  • tools: tool names invoked in this turn (from tool_use content blocks)
  • bash_cmds: bash/shell command strings invoked (from tool_use.input.command)
  • user_msg: the preceding user message text, already lowercased+truncated via normalize_user_text. None if there is no paired user turn (rare — happens for synthetic / SDK-initiated conversations).
  • text_chars: number of text characters the assistant produced in this turn (sum of text content blocks). Used to distinguish silent tool-only turns from pure-text conversations.