From 44531820d0395e4b8ead67a98c3e95457087595d Mon Sep 17 00:00:00 2001 From: iris Date: Sat, 4 Jul 2026 11:43:11 +0200 Subject: [PATCH] feat(agent-term): show details for plugin_install and commands_changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently both system subtypes fall through to the generic muted note renderer (⚙ ), giving the operator no insight into what is happening. plugin_install: Render status explicitly — "loading…" on started, "✓ done" on completed — so a slow plugin boot is visible in the scrollback instead of two identical cryptic rows. commands_changed: Render the count of available slash commands in the summary row and expand to the full list in a collapsible details block. The list is most useful right after a fresh plugin_install so the operator can see exactly which /commands are now on offer. Both handlers sit immediately before the generic catch-all in the system-subtype dispatch in renderStream, preserving the existing fall-through for other subtypes (context_window_exceeded etc.). Closes #2183. --- frontend/packages/agent/src/app.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/frontend/packages/agent/src/app.js b/frontend/packages/agent/src/app.js index abde53ea..80c7b15a 100644 --- a/frontend/packages/agent/src/app.js +++ b/frontend/packages/agent/src/app.js @@ -1809,6 +1809,34 @@ window.marked = marked; } return; } + // plugin_install: claude is loading/finishing a plugin (MCP server or + // slash-command provider). Show the status so the operator knows when + // a fresh session is loading its toolset. + if (v.subtype === 'plugin_install') { + const status = v.status === 'completed' ? '✓ done' + : v.status === 'started' ? 'loading…' + : (v.status || '?'); + api.row('note', '⚙ plugin install · ' + status); + return; + } + // commands_changed: the set of available slash commands changed (usually + // right after plugin_install). Show the count in the summary; expand to + // see the full list. + if (v.subtype === 'commands_changed') { + const cmds = Array.isArray(v.commands) ? v.commands : []; + if (!cmds.length) { + api.row('note', '⚙ commands changed · (empty)'); + return; + } + const summary = '⚙ commands changed · ' + cmds.length + ' available'; + const body = cmds.map((c) => { + const aliases = c.aliases && c.aliases.length + ? ' [/' + c.aliases.join(', /') + ']' : ''; + return '/' + c.name + aliases; + }).join('\n'); + api.details('note', summary, body); + return; + } // Other system subtypes (context_window_exceeded, etc.) — render a // muted note with the subtype label; reserve the loud orange `sys` // catch-all for truly unrecognised top-level types.