Skip to main content

cursor_tool_label

Function cursor_tool_label 

Source
fn cursor_tool_label(tc: &Value) -> String
Expand description

A concise label for a cursor-agent tool_call event. The tool_call object carries the tool under a single <name>ToolCall key (e.g. shellToolCall, readToolCall, editToolCall) alongside bookkeeping keys like hookAdditionalContexts / toolCallId. serde_json orders object keys alphabetically, so pick the *ToolCall key explicitly rather than the first one; strip the suffix and pull a salient argument (command / path) from args.