Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/openplotva-web/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ const ADMIN_ASSETS: &[StaticAsset] = &[
path: "index.html",
content_type: "text/html; charset=utf-8",
bytes: include_bytes!("../../../web/admin/index.html"),
sha256: "4c85e85dc3fdc3bf008028a93bf70f12ac75809d8223016da161cd682287bc74",
sha256: "05babd3e4fb42381a391106c639f7e0e753c8c1fec3839e04644d8127a9743d7",
},
StaticAsset {
path: "login.html",
Expand Down
14 changes: 11 additions & 3 deletions web/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6573,6 +6573,14 @@ <h3 class="an-section-title">Watchdog alarms</h3>
});
}

// Tool result statuses from openplotva-dialog: only `failed` is a failure;
// `queued` hands work to a background job and `noop` changes nothing.
const LLMD_TOOL_STATUS_TONES = { ok: 'success', executed: 'success', queued: 'info', noop: 'neutral', failed: 'danger' };

function llmdToolStatusTone(status) {
return LLMD_TOOL_STATUS_TONES[status] || 'neutral';
}

// Tool results are JSON envelopes; the summary line shows their message.
function llmdToolSnippet(text) {
try {
Expand All @@ -6599,9 +6607,9 @@ <h3 class="an-section-title">Watchdog alarms</h3>
}
const args = tool.args_json !== undefined && tool.args_json !== null ? tool.args_json : call.args;
const status = String(tool.status || (item ? 'ok' : '') || '');
const failed = status && status !== 'ok';
const failed = status === 'failed';
const facts = [];
if (status) facts.push(PL.badge(status, failed ? 'danger' : 'success'));
if (status) facts.push(PL.badge(status, llmdToolStatusTone(status)));
if (Number(tool.duration_ms) > 0) facts.push(formatAnalyticsMs(tool.duration_ms));
const resultText = result === undefined || result === null ? '' : llmdPretty(result);
return llmdStep('tool', {
Expand Down Expand Up @@ -6759,7 +6767,7 @@ <h3 class="an-section-title">Watchdog alarms</h3>
const tool = list[index];
const child = {
kind: 'tool', label: tool.name || 'tool', mono: true, start: times.start, end: times.end,
anchor: `llmd-step-tool-${round.seq}-${index}`, tone: tool.status && tool.status !== 'ok' ? 'fail' : '',
anchor: `llmd-step-tool-${round.seq}-${index}`, tone: tool.status === 'failed' ? 'fail' : '',
children: [], hosted: 0,
};
span.children.push(child);
Expand Down