Trim negative-space comments per mara's review

Don't state what a function/module doesn't do and where that
happens instead — just describe what it does. Cut the "not
something this function decides" / "not affected by this" /
"not a placeholder for a later commit" asides from the doc
comments touched in the last two commits.
This commit is contained in:
iris 2026-08-30 21:31:33 +02:00
commit 5930efc29b
4 changed files with 5 additions and 28 deletions

View file

@ -271,8 +271,7 @@ fn classify_assistant_content(content: &[Value], ctx: &mut ClassifyCtx) -> Vec<T
/// for Edit, markdown body for send, plain for everything else with a
/// body). That's now just "does this row have a body" — `body.is_some()`
/// on the returned [`TermMsg`] *is* the expandable signal, no separate
/// flag; whether it renders open or collapsed is a uniform client-side
/// preference, not something this function decides.
/// flag.
fn classify_tool_use(c: &Value) -> TermMsg {
let name = c.get("name").and_then(Value::as_str).unwrap_or("");
let input = c.get("input").cloned().unwrap_or_else(|| json!({}));
@ -427,10 +426,6 @@ fn classify_task_event(v: &Value) -> Option<TermMsg> {
/// - `"markdown"` → rendered via `marked` + `DOMPurify`; used for
/// message-bearing tools: `send`
///
/// Whether the resulting row renders open or collapsed is a uniform
/// client-side preference (the operator's expand-tool-output setting),
/// not something this function or its `body_type` decides.
///
/// Returns `None` for tools that have no body at all.
///
/// **`Write` is intentionally absent**: its `content` field can be megabytes

View file

@ -106,8 +106,7 @@ impl TermMsg {
/// actually returned, not across the live/history boundary. Accepted
/// degradation — the only user-visible effect is a `recv` result whose
/// `tool_use` fell on the other side of a page/reconnect boundary rendering
/// its body as plain text instead of markdown (open/collapsed state is a
/// uniform client-side preference either way, not affected by this).
/// its body as plain text instead of markdown.
#[derive(Default)]
pub struct ClassifyCtx {
tool_name_by_id: HashMap<String, String>,