Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: show thinking is a toggle of its own, apart from the developer details

This commit is contained in:
iris 2026-11-16 20:35:03 +01:00 • committed by mara
commit 857b175a74

View file

@ -2,7 +2,7 @@
An agent's terminal in the swarm UI renders one row per `TermMsg`
(`hive-agent/src/term_msg.rs`): `{ts, icon?, level: debug|info|warn|error,
summary, body?, body_format?: markdown|diff, coalesce_key?}`. Classification
summary, body?, body_format?: markdown|diff, coalesce_key?, kind?: thinking}`. Classification
(icon, summary text, whether a tool call gets an expandable body) happens
server-side, once — `term_msg.rs` + `stream_enrich.rs` — and the swarm queue's
terminal rows and `GET /events/stream` carry it identically. The stream wraps
@ -53,11 +53,20 @@ that motivated the change.
The settings menu's "hide developer details" toggle (`getHideDebugPref()`,
`@hive/shared/prefs.js`) skips `debug`-level rows entirely rather than
muting them further — client-side only, no reload. The swarm UI and the hive
dashboard both have the toggle, as one shared row
(`@hive/shared/hide-debug-setting.js`). Each browser origin keeps its own
setting. A `debug` row follows the toggle as it changes, so rows already
on screen hide or show at once, not only the rows that arrive after it.
muting them further — client-side only, no reload. The swarm UI has the
toggle as a shared row (`@hive/shared/hide-debug-setting.js`). Each browser
origin keeps its own setting. A `debug` row follows the toggle as it changes,
so rows already on screen hide or show at once, not only the rows that arrive
after it.
Thinking has its own toggle, "show thinking" (`getShowThinkingPref()`, on by
default, `@hive/shared/show-thinking-setting.js`). The harness marks the two
thinking rows, the thinking text and the live token count, with
`kind: "thinking"`; they stay `debug` level on the wire. A thinking row follows
"show thinking" alone and every other `debug` row follows "hide developer
details" alone (`terminal/row-visibility.ts` is the rule). A row from before the
harness sent `kind` has none, so it follows "hide developer details" until the
agent is rebuilt.
Per-tool icon + summary formatting (what a `Read`/`Edit`/`send` call's row
actually says) lives in `stream_enrich.rs`'s `fmt_tool_use()` family —