Agent Zero AI framework
status icons and formatting
3clyp50e275cab0c980
diff --git a/python/extensions/before_main_llm_call/_10_log_for_stream.py b/python/extensions/before_main_llm_call/_10_log_for_stream.pyindex 49b04b7b7..2adfc95e9 100644--- a/python/extensions/before_main_llm_call/_10_log_for_stream.py+++ b/python/extensions/before_main_llm_call/_10_log_for_stream.py@@ -19,8 +19,8 @@ class LogForStream(Extension):))-def build_heading(agent, text: str):- return f"icon://network_intelligence {agent.agent_name}: {text}"+def build_heading(agent, text: str, icon: str = "network_intelligence"):+ return f"icon://{icon} {text}"def build_default_heading(agent):return build_heading(agent, "Generating...")\ No newline at end of filediff --git a/python/extensions/response_stream/_10_log_from_stream.py b/python/extensions/response_stream/_10_log_from_stream.pyindex ace6baf54..375b96c03 100644--- a/python/extensions/response_stream/_10_log_from_stream.py+++ b/python/extensions/response_stream/_10_log_from_stream.py@@ -22,12 +22,9 @@ class LogFromStream(Extension):if "headline" in parsed:heading = build_heading(self.agent, parsed['headline'])elif "tool_name" in parsed:- heading = build_heading(self.agent, f"Using tool {parsed['tool_name']}") # if the llm skipped headline+ heading = build_heading(self.agent, f"Using {parsed['tool_name']}") # if the llm skipped headlineelif "thoughts" in parsed:- # thought length indicator- thoughts = "\n".join(parsed["thoughts"])- pipes = "|" * math.ceil(math.sqrt(len(thoughts)))- heading = build_heading(self.agent, f"Thinking... {pipes}")+ heading = build_default_heading(self.agent)# create log message and store it in loop data temporary paramsif "log_item_generating" not in loop_data.params_temporary:diff --git a/python/extensions/response_stream/_20_live_response.py b/python/extensions/response_stream/_20_live_response.pyindex f9455ed82..05cff9cb5 100644--- a/python/extensions/response_stream/_20_live_response.py+++ b/python/extensions/response_stream/_20_live_response.py@@ -30,7 +30,7 @@ class LiveResponse(Extension):loop_data.params_temporary["log_item_response"] = (self.agent.context.log.log(type="response",- heading=f"icon://chat {self.agent.agent_name}: Responding",+ heading=f"icon://chat Responding",))diff --git a/webui/components/messages/process-group/process-group-store.js b/webui/components/messages/process-group/process-group-store.jsindex 9382e5629..64e446c77 100644--- a/webui/components/messages/process-group/process-group-store.js+++ b/webui/components/messages/process-group/process-group-store.js@@ -78,110 +78,73 @@ const model = {this._persist();},- // Get icon for step type (Material Symbols)+ // Fallback icon for step type when backend doesn't provide one (Material Symbols)+ // Maps backend log types to appropriate iconsgetStepIcon(type) {const icons = {- 'agent': 'neurology',- 'tool': 'build',+ 'agent': 'network_intelligence',+ 'response': 'chat',+ 'tool': 'construction',+ 'mcp': 'api',+ 'subagent': 'communication','code_exe': 'terminal',- 'browser': 'language',+ 'browser': 'captive_portal',+ 'progress': 'timer','info': 'info','hint': 'lightbulb',- 'util': 'settings','warning': 'warning','error': 'error',- 'mcp': 'api',- 'memory': 'memory',- 'done': 'check_circle',- 'subagent': 'group'+ 'util': 'memory',+ 'user': 'person',+ 'done': 'done_all'};return icons[type] || 'circle';},- // Get 3-letter status code for step type+ // Status code (3-4 letter) for backend log typesgetStepCode(type) {const codes = {'agent': 'GEN',- 'tool': 'MCP',+ 'response': 'END',+ 'tool': 'TOOL',+ 'mcp': 'MCP',+ 'subagent': 'SUB','code_exe': 'EXE',- 'browser': 'EXE',+ 'browser': 'BRW',+ 'progress': 'WAIT','info': 'INF',- 'hint': 'INF',- 'util': 'UTL',+ 'hint': 'HNT','warning': 'WRN','error': 'ERR',- 'mcp': 'MCP',- 'memory': 'MEM',- 'done': 'END',- 'response': 'END',- 'subagent': 'SUB'+ 'util': 'UTL',+ 'user': 'USR',+ 'done': 'END'};- return codes[type] || 'GEN';+ return codes[type] || type?.toUpperCase()?.slice(0, 4) || 'GEN';},- // Get color class for status code+ // CSS color class for backend log typesgetStatusColorClass(type) {const colors = {'agent': 'status-gen',- 'tool': 'status-mcp',+ 'response': 'status-end',+ 'tool': 'status-tool',+ 'mcp': 'status-mcp',+ 'subagent': 'status-sub','code_exe': 'status-exe',- 'browser': 'status-exe',+ 'browser': 'status-brw',+ 'progress': 'status-wait','info': 'status-inf',- 'hint': 'status-inf',- 'util': 'status-utl',+ 'hint': 'status-hnt','warning': 'status-wrn','error': 'status-err',- 'mcp': 'status-mcp',- 'memory': 'status-mem',- 'done': 'status-end',- 'response': 'status-end',- 'subagent': 'status-sub'+ 'util': 'status-utl',+ 'user': 'status-usr',+ 'done': 'status-end'};return colors[type] || 'status-gen';},- // Get icon for badge display (Material Symbols)- getStepBadgeIcon(type) {- const icons = {- 'agent': 'public', // Globe for GEN (network intelligence)- 'tool': 'build', // Wrench for MCP- 'code_exe': 'terminal', // Terminal for EXE- 'browser': 'language', // Globe for browser- 'info': 'info',- 'hint': 'lightbulb',- 'util': 'settings',- 'warning': 'warning',- 'error': 'error',- 'mcp': 'build', // Wrench for MCP- 'memory': 'memory',- 'done': 'check_circle',- 'response': 'check_circle',- 'subagent': 'group'- };- return icons[type] || 'circle';- },-- // Get label for step type (longer description)- getStepLabel(type) {- const labels = {- 'agent': 'Generating',- 'tool': 'MCP Call',- 'code_exe': 'Executing',- 'browser': 'Browser',- 'info': 'Info',- 'hint': 'Hint',- 'util': 'Utility',- 'warning': 'Warning',- 'error': 'Error',- 'mcp': 'MCP',- 'memory': 'Memory',- 'done': 'Done',- 'response': 'Response',- 'subagent': 'Subagent'- };- return labels[type] || 'Process';- },-// Clear state for a specific context (when chat is reset)clearContext(contextPrefix) {// Clear groups matching the contextdiff --git a/webui/components/messages/process-group/process-group.css b/webui/components/messages/process-group/process-group.cssindex d7621f820..0aa0d87c2 100644--- a/webui/components/messages/process-group/process-group.css+++ b/webui/components/messages/process-group/process-group.css@@ -140,76 +140,106 @@opacity: 0.9;}-/* GEN - Generating (blue/cyan) */+/* Status colors - mapped from backend types via store */++/* GEN - agent type (blue/cyan) */.status-gen {background-color: rgba(56, 189, 248, 0.15);color: #38bdf8;border: 1px solid rgba(56, 189, 248, 0.3);}-/* EXE - Executing (magenta/purple) */-.status-exe {- background-color: rgba(186, 104, 200, 0.15);- color: #ba68c8;- border: 1px solid rgba(186, 104, 200, 0.3);+/* END - response/done type (green) */+.status-end {+ background-color: rgba(34, 197, 94, 0.15);+ color: #22c55e;+ border: 1px solid rgba(34, 197, 94, 0.3);}-/* MCP - MCP Tool Call (amber/yellow) */-.status-mcp {+/* TOOL - tool type (amber/yellow) */+.status-tool {background-color: rgba(251, 191, 36, 0.15);color: #fbbf24;border: 1px solid rgba(251, 191, 36, 0.3);}-/* MEM - Memory (blue) */-.status-mem {- background-color: rgba(96, 165, 250, 0.15);- color: #60a5fa;- border: 1px solid rgba(96, 165, 250, 0.3);+/* MCP - mcp type (amber/yellow) */+.status-mcp {+ background-color: rgba(251, 191, 36, 0.15);+ color: #fbbf24;+ border: 1px solid rgba(251, 191, 36, 0.3);}-/* END - Done (green) */-.status-end {- background-color: rgba(34, 197, 94, 0.15);- color: #22c55e;- border: 1px solid rgba(34, 197, 94, 0.3);+/* SUB - subagent type (teal) */+.status-sub {+ background-color: rgba(20, 184, 166, 0.15);+ color: #14b8a6;+ border: 1px solid rgba(20, 184, 166, 0.3);}-/* ERR - Error (red) */-.status-err {- background-color: rgba(239, 68, 68, 0.15);- color: #ef4444;- border: 1px solid rgba(239, 68, 68, 0.3);+/* EXE - code_exe type (magenta/purple) */+.status-exe {+ background-color: rgba(186, 104, 200, 0.15);+ color: #ba68c8;+ border: 1px solid rgba(186, 104, 200, 0.3);}-/* WRN - Warning (orange) */-.status-wrn {- background-color: rgba(249, 115, 22, 0.15);- color: #f97316;- border: 1px solid rgba(249, 115, 22, 0.3);+/* BRW - browser type (indigo) */+.status-brw {+ background-color: rgba(129, 140, 248, 0.15);+ color: #818cf8;+ border: 1px solid rgba(129, 140, 248, 0.3);}-/* SUB - Subagent (teal) */-.status-sub {- background-color: rgba(20, 184, 166, 0.15);- color: #14b8a6;- border: 1px solid rgba(20, 184, 166, 0.3);+/* WAIT - progress type (slate) */+.status-wait {+ background-color: rgba(148, 163, 184, 0.15);+ color: #94a3b8;+ border: 1px solid rgba(148, 163, 184, 0.3);}-/* INF - Info (gray) */+/* INF - info type (gray) */.status-inf {background-color: rgba(148, 163, 184, 0.15);color: #94a3b8;border: 1px solid rgba(148, 163, 184, 0.3);}-/* UTL - Utility (gray-blue) */+/* HNT - hint type (yellow-green) */+.status-hnt {+ background-color: rgba(163, 230, 53, 0.15);+ color: #a3e635;+ border: 1px solid rgba(163, 230, 53, 0.3);+}++/* WRN - warning type (orange) */+.status-wrn {+ background-color: rgba(249, 115, 22, 0.15);+ color: #f97316;+ border: 1px solid rgba(249, 115, 22, 0.3);+}++/* ERR - error type (red) */+.status-err {+ background-color: rgba(239, 68, 68, 0.15);+ color: #ef4444;+ border: 1px solid rgba(239, 68, 68, 0.3);+}++/* UTL - util type (gray-blue) */.status-utl {background-color: rgba(100, 116, 139, 0.15);color: #64748b;border: 1px solid rgba(100, 116, 139, 0.3);}+/* USR - user type (sky) */+.status-usr {+ background-color: rgba(56, 189, 248, 0.15);+ color: #38bdf8;+ border: 1px solid rgba(56, 189, 248, 0.3);+}+/* Animated spinner for active status (CSS-only, no Material Icons) */.status-badge.status-active::after {content: "";@@ -235,7 +265,7 @@display: none;}-/* END status with checkmark icon (like sketch) - use ::before only */+/* END status with checkmark icon - use ::before only */.status-end::before {content: "✓";margin-right: 2px;@@ -477,8 +507,13 @@.process-step-detail-content .step-kvp-key {color: var(--color-primary);font-weight: 500;- min-width: 80px;opacity: 0.8;+ display: flex;+ align-items: center;+}++.process-step-detail-content .step-kvp-key .material-symbols-outlined {+ font-size: 0.9rem;}.process-step-detail-content .step-kvp-value {@@ -540,8 +575,14 @@font-size: 0.68rem;font-weight: 600;color: var(--color-primary);- min-width: 70px;flex-shrink: 0;+ display: flex;+ align-items: center;+}++.process-step-detail-content .tool-arg-label .material-symbols-outlined {+ font-size: 0.9rem;+ opacity: 0.85;}.process-step-detail-content .tool-arg-value {@@ -558,6 +599,25 @@border-left-color: transparent;}+.process-step-detail-content .step-tool-header .tool-icon {+ font-size: 0.85rem;+ color: var(--color-warning);+ opacity: 0.85;+}++.process-step-detail-content .step-tool-header .tool-label {+ font-size: 0.68rem;+ font-weight: 600;+ color: var(--color-warning);+ opacity: 0.85;+}++.process-step-detail-content .step-tool-header .tool-name {+ font-size: 0.72rem;+ color: var(--color-text);+ opacity: 0.85;+}+/* Terminal-style output for code_exe */.process-step-detail-content .step-terminal {margin: var(--spacing-xs) 0;@@ -658,46 +718,46 @@border-color: rgba(14, 165, 233, 0.25);}-.light-mode .status-exe {- background-color: rgba(147, 51, 234, 0.12);- color: #7c3aed;- border-color: rgba(147, 51, 234, 0.25);+.light-mode .status-end {+ background-color: rgba(22, 163, 74, 0.12);+ color: #15803d;+ border-color: rgba(22, 163, 74, 0.25);}-.light-mode .status-mcp {+.light-mode .status-tool {background-color: rgba(217, 119, 6, 0.12);color: #b45309;border-color: rgba(217, 119, 6, 0.25);}-.light-mode .status-mem {- background-color: rgba(37, 99, 235, 0.12);- color: #1d4ed8;- border-color: rgba(37, 99, 235, 0.25);+.light-mode .status-mcp {+ background-color: rgba(217, 119, 6, 0.12);+ color: #b45309;+ border-color: rgba(217, 119, 6, 0.25);}-.light-mode .status-end {- background-color: rgba(22, 163, 74, 0.12);- color: #15803d;- border-color: rgba(22, 163, 74, 0.25);+.light-mode .status-sub {+ background-color: rgba(13, 148, 136, 0.12);+ color: #0f766e;+ border-color: rgba(13, 148, 136, 0.25);}-.light-mode .status-err {- background-color: rgba(220, 38, 38, 0.12);- color: #b91c1c;- border-color: rgba(220, 38, 38, 0.25);+.light-mode .status-exe {+ background-color: rgba(147, 51, 234, 0.12);+ color: #7c3aed;+ border-color: rgba(147, 51, 234, 0.25);}-.light-mode .status-wrn {- background-color: rgba(234, 88, 12, 0.12);- color: #c2410c;- border-color: rgba(234, 88, 12, 0.25);+.light-mode .status-brw {+ background-color: rgba(99, 102, 241, 0.12);+ color: #4f46e5;+ border-color: rgba(99, 102, 241, 0.25);}-.light-mode .status-sub {- background-color: rgba(13, 148, 136, 0.12);- color: #0f766e;- border-color: rgba(13, 148, 136, 0.25);+.light-mode .status-wait {+ background-color: rgba(100, 116, 139, 0.12);+ color: #475569;+ border-color: rgba(100, 116, 139, 0.25);}.light-mode .status-inf {@@ -706,12 +766,36 @@border-color: rgba(100, 116, 139, 0.25);}+.light-mode .status-hnt {+ background-color: rgba(132, 204, 22, 0.12);+ color: #65a30d;+ border-color: rgba(132, 204, 22, 0.25);+}++.light-mode .status-wrn {+ background-color: rgba(234, 88, 12, 0.12);+ color: #c2410c;+ border-color: rgba(234, 88, 12, 0.25);+}++.light-mode .status-err {+ background-color: rgba(220, 38, 38, 0.12);+ color: #b91c1c;+ border-color: rgba(220, 38, 38, 0.25);+}+.light-mode .status-utl {background-color: rgba(71, 85, 105, 0.12);color: #334155;border-color: rgba(71, 85, 105, 0.25);}+.light-mode .status-usr {+ background-color: rgba(14, 165, 233, 0.12);+ color: #0284c7;+ border-color: rgba(14, 165, 233, 0.25);+}+/* Animation for loading state */@keyframes pulse-step {0%, 100% { opacity: 0.5; }diff --git a/webui/css/messages.css b/webui/css/messages.cssindex 76cfd2ad9..2a1d64153 100644--- a/webui/css/messages.css+++ b/webui/css/messages.css@@ -78,13 +78,7 @@}.message-user {- background-color: #4a4a4a;- border-radius: var(--border-radius) !important;- /* border-bottom-right-radius: var(--spacing-xxs); */- /* min-width: 195px; */text-align: end;- box-shadow: inset 0 2rem 2rem -2rem rgba(0, 0, 0, 0.3),- inset 0 -2rem 2rem -2rem rgba(0, 0, 0, 0.1);}.message-user > div {diff --git a/webui/js/messages.js b/webui/js/messages.jsindex 7bb19eb88..04879830a 100644--- a/webui/js/messages.js+++ b/webui/js/messages.js@@ -218,42 +218,6 @@ export function _drawMessage(// Update message classesmessageDiv.className = `message ${mainClass} ${messageClasses.join(" ")}`;- // Handle heading- if (heading) {- let headingElement = messageDiv.querySelector(".msg-heading");- if (!headingElement) {- headingElement = document.createElement("div");- headingElement.classList.add("msg-heading");- messageDiv.insertBefore(headingElement, messageDiv.firstChild);- }-- let headingH4 = headingElement.querySelector("h4");- if (!headingH4) {- headingH4 = document.createElement("h4");- headingElement.appendChild(headingH4);- }- headingH4.innerHTML = convertIcons(escapeHTML(heading));-- if (resizeBtns) {- let minMaxBtn = headingElement.querySelector(".msg-min-max-btns");- if (!minMaxBtn) {- minMaxBtn = document.createElement("div");- minMaxBtn.classList.add("msg-min-max-btns");- minMaxBtn.innerHTML = `- <a href="#" class="msg-min-max-btn" @click.prevent="$store.messageResize.minimizeMessageClass('${mainClass}', $event)"><span class="material-symbols-outlined" x-text="$store.messageResize.getSetting('${mainClass}').minimized ? 'expand_content' : 'minimize'"></span></a>- <a href="#" class="msg-min-max-btn" x-show="!$store.messageResize.getSetting('${mainClass}').minimized" @click.prevent="$store.messageResize.maximizeMessageClass('${mainClass}', $event)"><span class="material-symbols-outlined" x-text="$store.messageResize.getSetting('${mainClass}').maximized ? 'expand' : 'expand_all'"></span></a>- `;- headingElement.appendChild(minMaxBtn);- }- }- } else {- // Remove heading if it exists but heading is null- const existingHeading = messageDiv.querySelector(".msg-heading");- if (existingHeading) {- existingHeading.remove();- }- }-// Find existing body div or create new onelet bodyDiv = messageDiv.querySelector(".message-body");if (!bodyDiv) {@@ -1162,8 +1126,8 @@ function createProcessGroup(id) {header.classList.add("process-group-header");header.innerHTML = `<span class="expand-icon"></span>- <span class="status-badge status-gen status-active group-status"><span class="badge-icon material-symbols-outlined">public</span>GEN</span><span class="group-title">Processing...</span>+ <span class="status-badge status-gen status-active group-status"><span class="badge-icon material-symbols-outlined">public</span>GEN</span><span class="group-metrics"><span class="metric-time" title="Start time"><span class="metric-value">--:--</span></span><span class="metric-steps" title="Steps"><span class="metric-value">0</span></span>@@ -1201,6 +1165,7 @@ function createProcessGroup(id) {function addProcessStep(group, id, type, heading, content, kvps, timestamp = null, durationMs = null, tokensIn = 0, tokensOut = 0) {const groupId = group.getAttribute("data-group-id");const stepsContainer = group.querySelector(".process-steps");+ const isGroupCompleted = group.classList.contains("process-group-completed");// Create step elementconst step = document.createElement("div");@@ -1235,9 +1200,7 @@ function addProcessStep(group, id, type, heading, content, kvps, timestamp = nul}}- // Get step info- const icon = processGroupStore.getStepIcon(type);- const label = processGroupStore.getStepLabel(type);+ // Get step info from heading (single source of truth: backend)const title = getStepTitle(heading, kvps, type);// Check if step should be expanded@@ -1250,16 +1213,17 @@ function addProcessStep(group, id, type, heading, content, kvps, timestamp = nulconst stepHeader = document.createElement("div");stepHeader.classList.add("process-step-header");- // Get 3-letter status code and color class+ // Status code and color class from store (maps backend types)const statusCode = processGroupStore.getStepCode(type);const statusColorClass = processGroupStore.getStatusColorClass(type);- // Get icon for step type- const stepIcon = processGroupStore.getStepBadgeIcon(type);+ // Icon extracted from heading (backend sends icon://xxx), fallback to type-based+ const stepIcon = extractIconFromHeading(heading) || processGroupStore.getStepIcon(type);+ const activeClass = isGroupCompleted ? "" : " status-active";stepHeader.innerHTML = `<span class="step-expand-icon"></span>- <span class="status-badge ${statusColorClass} status-active"><span class="badge-icon material-symbols-outlined">${stepIcon}</span>${statusCode}</span>+ <span class="status-badge ${statusColorClass}${activeClass}"><span class="badge-icon material-symbols-outlined">${stepIcon}</span>${statusCode}</span><span class="step-title">${escapeHTML(title)}</span>`;@@ -1355,12 +1319,23 @@ function getStepTitle(heading, kvps, type) {}}- return processGroupStore.getStepLabel(type);+ // Fallback: capitalize type (backend is source of truth)+ return type ? type.charAt(0).toUpperCase() + type.slice(1).replace(/_/g, ' ') : 'Process';+}++/**+ * Extract icon name from heading with icon:// prefix+ * Returns the icon name (e.g., "terminal") or null if no prefix found+ */+function extractIconFromHeading(heading) {+ if (!heading) return null;+ const match = String(heading).match(/^icon:\/\/([a-zA-Z0-9_]+)/);+ return match ? match[1] : null;}/**- * Clean step title by removing icon:// prefixes- * Preserves agent markers (A0:, A1:, etc.) so users can see which agent is executing+ * Clean step title by removing icon:// prefixes and status phrases+ * Preserves agent markers (A1:, A2:, etc.) so users can see which subordinate agent is executing*/function cleanStepTitle(text, maxLength) {if (!text) return "";@@ -1369,10 +1344,6 @@ function cleanStepTitle(text, maxLength) {// Remove icon:// patterns (e.g., "icon://network_intelligence")cleaned = cleaned.replace(/icon:\/\/[a-zA-Z0-9_]+\s*/g, "");- // Keep agent markers (A0:, A1:, etc.) - users need to see which agent is executing- // Only remove "A0:" as it's the main agent (implied)- cleaned = cleaned.replace(/^A0:\s*/i, "");-// Trim whitespacecleaned = cleaned.trim();@@ -1440,6 +1411,12 @@ function renderStepDetailContent(container, content, kvps, type = null) {const lowerKey = key.toLowerCase();+ // Skip headline and tool_name - they're shown elsewhere+ if (lowerKey === "headline" || lowerKey === "tool_name") continue;++ // Skip query in agent steps - it's shown in the tool call step+ if (type === "agent" && lowerKey === "query") continue;+// Special handling for thoughts/reasoning - render with single lightbulb iconif (lowerKey === "thoughts" || lowerKey === "thinking" || lowerKey === "reflection" || lowerKey === "reasoning") {const thoughtsDiv = document.createElement("div");@@ -1472,18 +1449,45 @@ function renderStepDetailContent(container, content, kvps, type = null) {continue;}- // Special handling for tool_args - render as structured labeled parameters- if (lowerKey === "tool_args" && typeof value === "object" && value !== null) {+ // Special handling for tool_args - render only for tool/mcp types (skip for agent)+ if (lowerKey === "tool_args") {+ // Skip tool_args for agent steps - it's shown in the tool call step+ if (type === "agent") continue;++ if (typeof value !== "object" || value === null) continue;const argsDiv = document.createElement("div");argsDiv.classList.add("step-tool-args");+ // Icon mapping for common tool arguments+ const argIcons = {+ 'query': 'search',+ 'url': 'link',+ 'path': 'folder',+ 'file': 'description',+ 'code': 'code',+ 'command': 'terminal',+ 'message': 'chat',+ 'text': 'notes',+ 'content': 'article',+ 'name': 'label',+ 'id': 'tag',+ 'type': 'category'+ };+for (const [argKey, argValue] of Object.entries(value)) {const argRow = document.createElement("div");argRow.classList.add("tool-arg-row");const argLabel = document.createElement("span");argLabel.classList.add("tool-arg-label");- argLabel.textContent = convertToTitleCase(argKey) + ":";++ // Use icon if available, otherwise use text label+ const lowerArgKey = argKey.toLowerCase();+ if (argIcons[lowerArgKey]) {+ argLabel.innerHTML = `<span class="material-symbols-outlined">${argIcons[lowerArgKey]}</span>`;+ } else {+ argLabel.textContent = convertToTitleCase(argKey) + ":";+ }const argVal = document.createElement("span");argVal.classList.add("tool-arg-value");@@ -1508,7 +1512,31 @@ function renderStepDetailContent(container, content, kvps, type = null) {const keySpan = document.createElement("span");keySpan.classList.add("step-kvp-key");- keySpan.textContent = convertToTitleCase(key) + ":";++ // Icon mapping for common kvp keys+ const kvpIcons = {+ 'query': 'search',+ 'url': 'link',+ 'path': 'folder',+ 'file': 'description',+ 'code': 'code',+ 'command': 'terminal',+ 'message': 'chat',+ 'text': 'notes',+ 'content': 'article',+ 'name': 'label',+ 'id': 'tag',+ 'type': 'category',+ 'runtime': 'memory',+ 'result': 'output'+ };++ // lowerKey already defined above+ if (kvpIcons[lowerKey]) {+ keySpan.innerHTML = `<span class="material-symbols-outlined">${kvpIcons[lowerKey]}</span>`;+ } else {+ keySpan.textContent = convertToTitleCase(key) + ":";+ }const valueSpan = document.createElement("span");valueSpan.classList.add("step-kvp-value");@@ -1578,6 +1606,7 @@ function updateProcessGroupHeader(group) {const titleEl = group.querySelector(".group-title");const statusEl = group.querySelector(".group-status");const metricsEl = group.querySelector(".group-metrics");+ const isCompleted = group.classList.contains("process-group-completed");// Update step count in metricsconst stepsMetricEl = metricsEl?.querySelector(".metric-steps .metric-value");@@ -1626,6 +1655,14 @@ function updateProcessGroupHeader(group) {tokensMetricEl.textContent = "--";}}++ // Once a group is completed, never re-enable any loading spinners (status-active).+ // This prevents late util/tool messages from making a completed group look "running".+ if (isCompleted) {+ const activeBadges = group.querySelectorAll(".status-badge.status-active");+ activeBadges.forEach(badge => badge.classList.remove("status-active"));+ return;+ }if (steps.length > 0) {// Get the last step's type for status@@ -1635,9 +1672,12 @@ function updateProcessGroupHeader(group) {// Update status badge with icon (keep status-active during execution)if (statusEl) {+ // Status code and color class from store (maps backend types)const statusCode = processGroupStore.getStepCode(lastType);const statusColorClass = processGroupStore.getStatusColorClass(lastType);- const badgeIcon = processGroupStore.getStepBadgeIcon(lastType);+ // Get icon from the last step's badge, fallback to type-based+ const lastStepBadge = lastStep.querySelector(".badge-icon");+ const badgeIcon = lastStepBadge?.textContent || processGroupStore.getStepIcon(lastType);statusEl.innerHTML = `<span class="badge-icon material-symbols-outlined">${badgeIcon}</span>${statusCode}`;statusEl.className = `status-badge ${statusColorClass} status-active group-status`;}@@ -1683,8 +1723,8 @@ function markProcessGroupComplete(group, responseTitle) {// Update status badge to END (remove status-active)const statusEl = group.querySelector(".group-status");if (statusEl) {- statusEl.textContent = "END";- statusEl.className = "status-badge status-end group-status"; // No status-active+ statusEl.innerHTML = '<span class="badge-icon material-symbols-outlined">check_circle</span>END';+ statusEl.className = "status-badge status-response group-status"; // No status-active}// Remove status-active from all step badges (stop spinners)