fix(agent-ui): coalesce plugin_install started/completed into one row
claude emits a started tick then a completed tick per plugin install; previously each got its own row (loading... then done) instead of one line updating in place. Same coalescing pattern already used for thinking_tokens and the generic status tick.
This commit is contained in:
parent
e0d5c98356
commit
82250b8f59
1 changed files with 13 additions and 1 deletions
|
|
@ -1907,6 +1907,12 @@ window.marked = marked;
|
||||||
// rather than one "still going" line.
|
// rather than one "still going" line.
|
||||||
let statusRow = null;
|
let statusRow = null;
|
||||||
let statusText = null;
|
let statusText = null;
|
||||||
|
// Same coalescing for `plugin_install`: claude emits a `started` tick
|
||||||
|
// then a `completed` tick per plugin — without coalescing that's two
|
||||||
|
// separate rows ("loading…" then "✓ done") for what's really one event
|
||||||
|
// from the operator's point of view; update in place instead.
|
||||||
|
let pluginInstallRow = null;
|
||||||
|
let pluginInstallText = null;
|
||||||
function renderStream(v, api) {
|
function renderStream(v, api) {
|
||||||
// Drop claude's result line and rate-limit — noise. TurnEnd
|
// Drop claude's result line and rate-limit — noise. TurnEnd
|
||||||
// communicates pass/fail; rate-limit events are noisy status chatter.
|
// communicates pass/fail; rate-limit events are noisy status chatter.
|
||||||
|
|
@ -1959,7 +1965,13 @@ window.marked = marked;
|
||||||
const status = v.status === 'completed' ? '✓ done'
|
const status = v.status === 'completed' ? '✓ done'
|
||||||
: v.status === 'started' ? 'loading…'
|
: v.status === 'started' ? 'loading…'
|
||||||
: (v.status || '?');
|
: (v.status || '?');
|
||||||
api.row('note', '⚙ plugin install · ' + status);
|
const text = '⚙ plugin install · ' + status;
|
||||||
|
if (pluginInstallRow && pluginInstallRow.isConnected
|
||||||
|
&& pluginInstallRow.nextElementSibling === null) {
|
||||||
|
pluginInstallText.nodeValue = text;
|
||||||
|
} else {
|
||||||
|
[pluginInstallRow, pluginInstallText] = api.mutableRow('note', text);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// commands_changed: the set of available slash commands changed (usually
|
// commands_changed: the set of available slash commands changed (usually
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue