Compare commits

...
Author SHA1 Message Date
iris
f14056996e terminal: catch the remaining stale ask/answer references
argus, reviewing PR#3793: a third stale  ask mention survived in the
same file/table the first pass touched (docs/terminal-rendering.md's
icon legend) — tool_icon() has no ask/answer arm at all, confirmed by
reading the function directly. Swept the whole tree this time instead
of trusting the earlier narrow grep: found three more —
docs/web-ui/dashboard.md's S3TT1NGS section still documented the
expand-tool-output toggle as living on the dashboard, which moved to
the per-agent page's own SettingsMenu popover in #3780 and was never
followed up here; markdown.ts/streamRow.ts/terminal.css had the same
send/ask/answer/recv phrasing as the original two comments.
2026-08-30 20:13:49 +02:00
iris
6233538f29 terminal: drop stale ask/answer references in comments and docs
mara, on #3791: "also ask/answer was removed, so any references are
stale and can be removed afaik" — confirmed: no code anywhere
references those tool names anymore (the rich-markdown classification
is generic, gated on _category/_body_type stamped server-side, not a
per-tool-name check), just two leftover comment/doc mentions.
2026-08-30 20:13:49 +02:00
6 changed files with 17 additions and 26 deletions

View file

@ -61,9 +61,9 @@ parent's negative pull.
| `.turn-time` | `· HH:MM:SS` on turn-start; `· HH:MM:SS · <dur>` on turn-end (child span) | muted, smaller | per-event `ts` (unix seconds) on the live frame + history row | harness |
| `.text` | (no prefix; markdown body) | fg | claude `assistant.content[].text` | stream-json |
| `.thinking` | `💭 thinking …` | muted, italic | claude `assistant.content[].thinking` | stream-json |
| `.tool-use` (flat) | `<icon> Name args…` | cyan | tool_use w/o rich renderer; `<icon>` from the backend's `tool_icon(name)` (`stream_enrich.rs`): 📤 send · 📥 recv · ❓ ask · ⏰ remind · 🏷️ set_status · 🪢 loose-ends · ✂️ cancel_loose_end · get_agent_meta · ✅ ack_until · 📜 get_logs/get_host_journal · ↻ restart · ⏹️ kill · ▶️ start · 🔄 update · 📋 list_containers/list_rooms/list_room_members/list_invites · 📖 read_room/Read · 👁️ mark_read · 🛑 bash kill · 🖥️ bash other · 💬 matrix send/reply/dm · 📦 request_* · ⏱️ schedule · 🔧 default | stream-json |
| `.tool-use` (flat) | `<icon> Name args…` | cyan | tool_use w/o rich renderer; `<icon>` from the backend's `tool_icon(name)` (`stream_enrich.rs`): 📤 send · 📥 recv · ⏰ remind · 🏷️ set_status · 🪢 loose-ends · ✂️ cancel_loose_end · get_agent_meta · ✅ ack_until · 📜 get_logs/get_host_journal · ↻ restart · ⏹️ kill · ▶️ start · 🔄 update · 📋 list_containers/list_rooms/list_room_members/list_invites · 📖 read_room/Read · 👁️ mark_read · 🛑 bash kill · 🖥️ bash other · 💬 matrix send/reply/dm · 📦 request_* · ⏱️ schedule · 🔧 default | stream-json |
| `.tool-use` `<details>` | `✏️ Edit <path> · -N +N` (no `→`) | cyan, body is +/- diff | `renderRichToolUse` Edit | stream-json |
| `.tool-use` `<details open>` | `📤 send → to · NL`, `❓ ask → to`, `✍️ answer #id` | cyan, body is markdown | rich renderer for send / ask / answer | stream-json |
| `.tool-use` `<details open>` | `📤 send → to · NL` | cyan, body is markdown | rich renderer for send | stream-json |
| `.tool-result` (flat) | `← <txt>` | muted | short `tool_result` (≤120c, non-recv) | stream-json |
| `.tool-result-block` `<details>` | `Nl · headline` | muted, body is text | long generic `tool_result` | stream-json |
| `.tool-result-block` `<details open>` | `recv ← <txt>` | muted, body is markdown | `tool_result` correlated to a prior `recv` tool_use via id | stream-json |
@ -222,8 +222,7 @@ class="md">`. CSS in `terminal.css` scopes paragraph / code /
list / blockquote / link styling under `.live .row .md` so
the markdown body doesn't bleed into the row's own
text-indent. Falls back to plain text if `marked` didn't
load. Applied to `text` rows and to send / ask / answer /
recv message bodies.
load. Applied to `text` rows and to send / recv message bodies.
## Extra-MCP tools

View file

@ -617,9 +617,9 @@ prices. Models not covered fall back to hive-c0re's built-in estimate.
Operator-local preferences. State lives in the browser's
`localStorage` — preferences do NOT sync between devices and
do NOT survive a profile wipe. Two sections today (browser
notifications, agent terminal); future preferences (theme, density,
etc.) land here as sibling `<h3>` blocks in `settings.html`.
do NOT survive a profile wipe. One section today (browser
notifications); future preferences land here as sibling `<h3>`
blocks in `settings.html`.
**◇ browser notifications** — `🔔 enable notifications` button when
permission ungranted; `🔕 mute / 🔔 unmute` toggle once granted
@ -630,18 +630,10 @@ single status line explains why. See `### Browser notifications`
below for the dispatch model + the three signals the dashboard
emits OS notifications on.
**◇ agent terminal** — a single `☐/☑ expand tool output panels`
toggle button (`role="switch"`, live `aria-checked`). Controls whether
every per-agent page's terminal defaults otherwise-collapsed
`<details>` rows (long tool-results, Write/Edit diffs, …) open; rows
that already default open regardless (send/ask/answer/recv) are
unaffected either way. Pure client-side — the key + get/set live in
`@hive/shared/prefs.js` (`getExpandDetailsPref`/`setExpandDetailsPref`)
so this page and every agent page's `app.js` read/write the exact same
`localStorage` key without a backend field; the shared terminal
factory reads it live via its `expandDetails` option (see
docs/web-ui/shape.md::Shared terminal pane), so a change here applies
to any already-open agent tab's next rendered row without a reload.
The "expand tool output panels" toggle used to live here too; it
moved into the per-agent page's own settings popover (`SettingsMenu`,
`@hive/shared/settings-menu.js`) since it's agent-terminal-only and
this tab is shared with swarm-ui — see that component's file comment.
The FL0W page does NOT host this pane — settings live only on the
dashboard's S3TT1NGS tab (reach it via the FL0W page's `← home`

View file

@ -172,8 +172,8 @@ function classifyStream(v: AnyEvent, fromHistory: boolean, ctx: ClassifyCtx): St
}
// `_category === 'rich'` tools get an expandable row: diff body (Edit),
// default-open markdown body (send/ask/answer/recv-shaped, always open
// regardless of the preference below — matches app.js), or a plain
// default-open markdown body (send/recv-shaped, always open regardless
// of the preference below — matches app.js), or a plain
// body (collapsed unless the operator's "expand tool output" preference
// says otherwise — @hive/shared/prefs.js's getExpandDetailsPref(), read
// fresh per row so a mid-session preference change applies going

View file

@ -1,6 +1,6 @@
// Markdown → sanitized HTML, ported from app.js's `mdNode`. Message
// bodies rendered into the live stream (assistant text, send/ask/answer/
// recv payloads) are untrusted (peer-agent / matrix-relayed content,
// bodies rendered into the live stream (assistant text, send/recv
// payloads) are untrusted (peer-agent / matrix-relayed content,
// agent-authored files) — `marked` itself no longer sanitizes (v5+
// dropped the built-in sanitizer), so every parse is run through
// DOMPurify before it's ever handed to `dangerouslySetInnerHTML`.

View file

@ -40,7 +40,7 @@ export interface StreamRow {
* body today) its own class, no markdown parsing. */
childText?: StreamRowMeta;
/** Sanitized-markdown body: appended under a flat row (assistant
* text) or inside an open details row (send/ask/answer/recv bodies). */
* text) or inside an open details row (send/recv bodies). */
markdownBody?: string;
/** Plain `<pre>` body inside a details row (generic long tool output). */
plainBody?: string;

View file

@ -276,8 +276,8 @@ details.row > pre.tool-body { color: var(--fg); }
details.row > pre.diff-body .diff-add { color: var(--green); }
details.row > pre.diff-body .diff-del { color: var(--red); }
details.row > pre.diff-body .diff-ctx { color: var(--fg); }
/* Markdown body inside a row (assistant text, send/recv/ask/answer
message bodies). Inline elements get muted accents; block elements
/* Markdown body inside a row (assistant text, send/recv message
bodies). Inline elements get muted accents; block elements
reset the parent row's hanging indent so content lays out cleanly. */
.live .row .md p { margin: 0.2em 0; }
.live .row .md p:first-child { margin-top: 0; }