MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / first_line

Function first_line

src/tool_command.rs:376–383  ·  view source on GitHub ↗

First line of a (possibly multi-line) description, truncated for layout.

(s: &str)

Source from the content-addressed store, hash-verified

374
375/// First line of a (possibly multi-line) description, truncated for layout.
376fn first_line(s: &str) -> String {
377 let line = s.lines().next().unwrap_or("");
378 if line.len() > 90 {
379 format!("{}…", &line[..89])
380 } else {
381 line.to_string()
382 }
383}
384
385/// Best-effort categorisation by tool-name prefix. Matches how the codebase
386/// already groups handlers (`graph`, `info`, `git`, `analysis`, `health`,

Callers 15

visit_let_bindingMethod · 0.85
visit_type_definitionMethod · 0.85
visit_functionMethod · 0.85
visit_bindMethod · 0.85
visit_data_typeMethod · 0.85
visit_classMethod · 0.85
visit_instanceMethod · 0.85
visit_defnMethod · 0.85
visit_defMethod · 0.85
visit_deftypeMethod · 0.85
visit_defMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected