feat: show agent name on hover in dashboard

This commit is contained in:
larchanka
2026-04-05 16:15:23 +02:00
parent 0360275eea
commit 242604675a

View File

@@ -266,11 +266,16 @@ async function updateDashboard() {
const activeIndicator = ['planning', 'running'].includes(n.status) ? '<div class="pulse"></div>' : '';
const typeLabel = n.type.split('.').pop().toUpperCase();
let chipAttr = '';
if (n.type === 'skill' && n.input) {
if ((n.type === 'skill' || n.type === 'agent') && n.input) {
try {
const input = typeof n.input === 'string' ? JSON.parse(n.input) : n.input;
const skillName = input.skillName || input.skill;
if (skillName) chipAttr = ` data-title="Skill: ${skillName}"`;
if (n.type === 'skill') {
const skillName = input.skillName || input.skill;
if (skillName) chipAttr = ` data-title="Skill: ${skillName}"`;
} else if (n.type === 'agent') {
const agentName = input.name || "Task Agent";
chipAttr = ` data-title="Agent: ${agentName}"`;
}
} catch (e) { }
}
return `<div class="node-chip ${n.status}"${chipAttr}>${activeIndicator}${typeLabel}</div>`;