Skip to main content

Module tool_headlines

Module tool_headlines 

Source
Expand description

Shared tool-call headlines and transcript detail lines.

Single home for the display phrases both transcript surfaces render — the CLI (src/agent/runloop/unified/tool_summary*) and the desktop app (vtcode-desktop/src/desktop/transcript/) — so a headline or skip list can never drift between them. String-based by design (same contract as crate::tracker_title): callers walk their own payload shapes and converge here for the humanization, truncation, and fallback rules.

Surface composition stays local: the CLI keeps its (headline, used) dispatcher, MCP prefix policy, and TUI renderers; the desktop keeps its verb categories, single-line collapse, and GPUI renderers. Only the pure phrase builders live here.

Functions§

collect_param_details
Human Key: value lines for the arguments a headline does not consume.
describe_code_search
Headline for code_search over the query and its alias keys.
describe_fetch_action
Headline for the fetch tools over the full target URL.
describe_grep_file
Headline for grep_file: the pattern is required, the scope joins it when present. Reports exactly the keys its headline consumed.
describe_list_files
Headline for list_files: location first, then the name and content pattern fallbacks. Reports exactly the keys its headline consumed, so detail collection hides if and only if the title phrased them.
exec_session_param_detail
One row for an exec-session follow-up: session identity plus an explicit wait deadline.
harness_is_user_visible
Whether a harness event belongs in the user-visible transcript.
has_session_input
Whether the call carries a non-empty stdin payload under the input keys.
humanize_key
Humanize a parameter key (timeout_secs → Timeout secs).
humanize_tool_name
Human fallback for tool names the headline readers cannot phrase.
is_noise_param
Parameter keys that are infrastructure/plumbing noise, omitted from the human-facing summary. Session plumbing (session_id, chars, wait deadlines) is not noise: exec_session_param_detail folds it into one identity row instead. Search strings (query) are content, never plumbing: they hide only when the headline consumed them.
is_path_key
Keys whose values are file-system paths, shown relative to the workspace.
is_verbose_key
Raw content keys too verbose for a summary row (commands, file bodies).
lookup_first_string
First non-blank string under the given keys, trimmed.
lookup_string
First non-blank string under a single key, trimmed.
mcp_tool_display_name
Bare tool name from an MCP-qualified one (None for non-MCP names).
preview_command
Compact single-line preview of a command for • Ran … headers.
preview_full_command
Full-length variant of preview_command for transcript surfaces.
relativize_to_workspace
Display a path relative to the workspace root when it lies within it.
search_headline
Search headline per tool: code_search takes the shared describer; anything else phrases a file search over the first of pattern/query.
session_followup_title
Action-aware title for session follow-up calls; None falls through to the argument gist (run launches show the command text instead).
strip_mcp_prefix
MCP prefixes stripped, or the name itself when it carries none.
summarize_list
Summarize a string list to two items plus an overflow count.
unified_exec_action_label
Action-aware label for command_session_internal follow-up calls.
verb_callout_headline
Verb-led running callout for any tool call (Read main.rs, Ran cargo check): the surface-neutral form of the headline an already-running call shows so the live status agrees with the completed summary row.
write_stdin_action_label
otherwise input sniffing decides send vs read so pure waits never misrender as sends.