Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bddeb5478e | ||
|
|
0894030754 |
2 changed files with 35 additions and 3 deletions
|
|
@ -1431,11 +1431,38 @@ window.marked = marked;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
function renderStream(v, api) {
|
function renderStream(v, api) {
|
||||||
// Drop session init, claude's result line, rate-limit — noise.
|
// Drop claude's result line and rate-limit — noise. TurnEnd
|
||||||
// TurnEnd communicates pass/fail; session init isn't actionable.
|
// communicates pass/fail; rate-limit events are noisy status chatter.
|
||||||
if (v.type === 'system' && v.subtype === 'init') return;
|
|
||||||
if (v.type === 'rate_limit_event') return;
|
if (v.type === 'rate_limit_event') return;
|
||||||
if (v.type === 'result') return;
|
if (v.type === 'result') return;
|
||||||
|
// `system` events: `init` is silent startup noise; `api_retry`
|
||||||
|
// and `api_error` get human-readable notes; unknown subtypes get a
|
||||||
|
// muted line rather than a raw-JSON dump in the loud `sys` colour.
|
||||||
|
if (v.type === 'system') {
|
||||||
|
if (v.subtype === 'init') return;
|
||||||
|
if (v.subtype === 'api_retry') {
|
||||||
|
const parts = ['⚠ api retry'];
|
||||||
|
if (v.attempt != null && v.max_retries != null)
|
||||||
|
parts.push(v.attempt + '/' + v.max_retries);
|
||||||
|
if (v.error) parts.push(String(v.error));
|
||||||
|
else if (v.error_status) parts.push('HTTP ' + v.error_status);
|
||||||
|
if (v.retry_delay_ms != null)
|
||||||
|
parts.push(Math.round(v.retry_delay_ms) + 'ms');
|
||||||
|
api.row('note', parts.join(' · '));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (v.subtype === 'api_error') {
|
||||||
|
const msg = v.error || v.message
|
||||||
|
|| (v.error_status ? 'HTTP ' + v.error_status : 'unknown');
|
||||||
|
api.row('note stderr', '✗ api error · ' + msg);
|
||||||
|
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.
|
||||||
|
api.row('note', '⚙ ' + (v.subtype || 'system'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
// Background-task subagent events (claude's `Task` tool spawns
|
// Background-task subagent events (claude's `Task` tool spawns
|
||||||
// a separate session whose progress lands here as `task_*`
|
// a separate session whose progress lands here as `task_*`
|
||||||
// subtypes). Match by subtype so we don't have to track which
|
// subtypes). Match by subtype so we don't have to track which
|
||||||
|
|
|
||||||
|
|
@ -651,9 +651,11 @@ window.marked = marked;
|
||||||
|| (op && (op.state === 'running'
|
|| (op && (op.state === 'running'
|
||||||
? (op.kind === 'meta_update' ? 'meta-updating'
|
? (op.kind === 'meta_update' ? 'meta-updating'
|
||||||
: op.kind === 'destroy' ? 'destroying'
|
: op.kind === 'destroy' ? 'destroying'
|
||||||
|
: op.kind === 'restart' ? 'restarting'
|
||||||
: 'rebuilding')
|
: 'rebuilding')
|
||||||
: (op.kind === 'meta_update' ? 'meta-update queued'
|
: (op.kind === 'meta_update' ? 'meta-update queued'
|
||||||
: op.kind === 'destroy' ? 'destroy queued'
|
: op.kind === 'destroy' ? 'destroy queued'
|
||||||
|
: op.kind === 'restart' ? 'restart queued'
|
||||||
: 'rebuild queued')));
|
: 'rebuild queued')));
|
||||||
const opRunning = transientKind != null
|
const opRunning = transientKind != null
|
||||||
|| (op != null && op.state === 'running');
|
|| (op != null && op.state === 'running');
|
||||||
|
|
@ -2177,6 +2179,9 @@ window.marked = marked;
|
||||||
meta_update: '◆',
|
meta_update: '◆',
|
||||||
spawn: '✨',
|
spawn: '✨',
|
||||||
destroy: '🗑',
|
destroy: '🗑',
|
||||||
|
restart: '↺',
|
||||||
|
startup_sweep: '⚡',
|
||||||
|
perm_change: '🔑',
|
||||||
};
|
};
|
||||||
const QUEUE_STATE_GLYPH = {
|
const QUEUE_STATE_GLYPH = {
|
||||||
queued: '⏸',
|
queued: '⏸',
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue