From 4539091f3cc99983ea2097d87d5926616a6c6347 Mon Sep 17 00:00:00 2001 From: iris Date: Thu, 21 May 2026 17:57:24 +0200 Subject: [PATCH] terminal: show recv wait/max params + bash [bg] flag recv tool-use rows rendered as a bare recv() regardless of args, hiding whether a turn is parked on a long-poll (wait_seconds) or draining a burst (max). fmtToolUse now surfaces both. Bash rows gain a [bg] flag when run_in_background is set. closes #158 --- docs/terminal-rendering.md | 4 ++++ hive-ag3nt/assets/app.js | 13 +++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/terminal-rendering.md b/docs/terminal-rendering.md index 51eedf4..4136093 100644 --- a/docs/terminal-rendering.md +++ b/docs/terminal-rendering.md @@ -69,6 +69,10 @@ parent's negative pull. `renderRichToolUse` (Write/Edit/send/ask/answer get custom renderings); on miss fall through to a flat `.tool-use` row with `fmtToolUse → fmtArgsGeneric`. + `fmtToolUse` surfaces the salient arg per built-in tool — + e.g. `recv` shows `wait s` / `max ` when set (bare + `recv()` otherwise), `Bash` flags `[bg]` for + `run_in_background` commands. 4. `type == "user"` → walk `message.content[]` for `tool_result`; `renderToolResult` correlates via `tool_use_id → toolNameById` to default-open `recv` diff --git a/hive-ag3nt/assets/app.js b/hive-ag3nt/assets/app.js index 452c4d0..5eec2d5 100644 --- a/hive-ag3nt/assets/app.js +++ b/hive-ag3nt/assets/app.js @@ -822,11 +822,20 @@ case 'Edit': return short + ' ' + (input.file_path || ''); case 'Glob': return short + ' ' + (input.pattern || ''); case 'Grep': return short + ' ' + (input.pattern || ''); - case 'Bash': return short + ' $ ' + (input.command || ''); + case 'Bash': return short + (input.run_in_background ? ' [bg]' : '') + + ' $ ' + (input.command || ''); case 'TodoWrite': return short + ' (' + ((input.todos || []).length) + ' items)'; case 'mcp__hyperhive__send': return short + ' → ' + (input.to || '?') + ': ' + JSON.stringify(input.body || '').slice(0, 80); - case 'mcp__hyperhive__recv': return short + '()'; + case 'mcp__hyperhive__recv': { + // Surface the long-poll wait + batch size — a bare `recv()` row + // hides whether the agent is parking a turn (wait_seconds) or + // draining a burst (max). + const parts = []; + if (input.wait_seconds != null) parts.push('wait ' + input.wait_seconds + 's'); + if (input.max != null) parts.push('max ' + input.max); + return short + (parts.length ? ' ' + parts.join(' · ') : '()'); + } case 'mcp__hyperhive__request_spawn': return short + ' ' + (input.name || ''); case 'mcp__hyperhive__kill': return short + ' ' + (input.name || ''); case 'mcp__hyperhive__request_apply_commit':