From f11357537e492bccc9a603a85768125f30c64be5 Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 4 Jul 2026 12:39:59 +0200 Subject: [PATCH] feat(agent-term): add formatters for scheduling and remaining request_* tools MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Scheduling tools and the two remaining request_* tools fell through to fmtArgsGeneric. They already had appropriate icons (⏱️ / 📦) but the arg display was multi-field verbose. New fmtToolUse cases: - request_init_config: 'request_init_config* iris' - request_update_meta_inputs: 'request_update_meta_inputs* [nixpkgs, …]' (or 'all' when inputs list is empty) - list_schedules: 'list_schedules*()' (no args, explicit) - cancel_schedule: 'cancel_schedule* #42 all' or '#42 [iris, dmatrix]' - fire_schedule_now: 'fire_schedule_now* #42' - edit_schedule: 'edit_schedule* #42 · body · interval · +2 tgt' (lists which fields are being changed, not their values) - request_schedule_prompt: 'request_schedule_prompt* → iris at 14:00Z +3600s' Closes #2201 --- frontend/packages/agent/src/app.js | 34 ++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/frontend/packages/agent/src/app.js b/frontend/packages/agent/src/app.js index 63916293..6717f90e 100644 --- a/frontend/packages/agent/src/app.js +++ b/frontend/packages/agent/src/app.js @@ -1626,6 +1626,40 @@ window.marked = marked; } case 'mcp__hyperhive__request_apply_commit': return short + ' ' + (input.agent || '') + ' @ ' + (input.commit_ref || '').slice(0, 12); + case 'mcp__hyperhive__request_init_config': + return short + ' ' + (input.name || '?'); + case 'mcp__hyperhive__request_update_meta_inputs': { + const ins = Array.isArray(input.inputs) && input.inputs.length + ? '[' + input.inputs.slice(0, 4).join(', ') + + (input.inputs.length > 4 ? ', …' : '') + ']' + : 'all'; + return short + ' ' + ins; + } + case 'mcp__hyperhive__list_schedules': + return short + '()'; + case 'mcp__hyperhive__cancel_schedule': + return short + ' #' + (input.id != null ? input.id : '?') + + (Array.isArray(input.targets) && input.targets.length + ? ' [' + input.targets.join(', ') + ']' : ' all'); + case 'mcp__hyperhive__fire_schedule_now': + return short + ' #' + (input.id != null ? input.id : '?'); + case 'mcp__hyperhive__edit_schedule': { + const parts = ['#' + (input.id != null ? input.id : '?')]; + if (input.body != null) parts.push('body'); + if (input.interval_seconds != null) parts.push('interval'); + if (input.next_fire_at_unix != null) parts.push('next'); + if (input.targets_add) parts.push('+' + input.targets_add.length + ' tgt'); + if (input.targets_remove) parts.push('-' + input.targets_remove.length + ' tgt'); + return short + ' ' + parts.join(' · '); + } + case 'mcp__hyperhive__request_schedule_prompt': { + const tgts = Array.isArray(input.targets) ? input.targets : []; + const when = input.first_fire_at_unix != null + ? new Date(input.first_fire_at_unix * 1000).toISOString().slice(11, 16) + 'Z' + : '?'; + return short + ' → ' + (tgts.length ? tgts.join(', ') : '?') + ' at ' + when + + (input.interval_seconds != null ? ' +' + input.interval_seconds + 's' : ''); + } case 'mcp__bash__run': { // Rich renderer handles the full body; this summary covers any // fallback path and the details summary line.