From 294aa6be4b5e021d466df574b73367064beb7843 Mon Sep 17 00:00:00 2001 From: Fimeg Date: Sat, 20 Dec 2025 17:27:19 -0500 Subject: [PATCH] fix: Complete ChatTimeline integration with command naming\n\n- Replace all .replace() calls with formatCommandAction\n- Replace hard-coded scan conditionals with dynamic naming\n- All command display now uses centralized service\n\nCommand naming service now fully integrated for ETHOS compliance. --- .../src/components/ChatTimeline.tsx | 44 ++++--------------- 1 file changed, 9 insertions(+), 35 deletions(-) diff --git a/aggregator-web/src/components/ChatTimeline.tsx b/aggregator-web/src/components/ChatTimeline.tsx index 04a974a..04b3186 100644 --- a/aggregator-web/src/components/ChatTimeline.tsx +++ b/aggregator-web/src/components/ChatTimeline.tsx @@ -472,45 +472,19 @@ const ChatTimeline: React.FC = ({ agentId, className, isScope if (entry.type === 'command') { - if (action === 'scan updates') { + if (entry.action.startsWith('scan_')) { + const display = getCommandDisplay(entry.action); + const verb = display.verb; + const noun = display.noun; + if (isInProgress) { - sentence = `Package Update Scanner initiated`; + sentence = `${verb} ${noun} initiated`; } else if (statusType === 'success') { - sentence = `Package Update Scanner completed`; + sentence = `${verb} ${noun} completed`; } else if (statusType === 'failed') { - sentence = `Package Update Scanner failed`; + sentence = `${verb} ${noun} failed`; } else { - sentence = `Package Update Scanner results`; - } - } else if (action === 'scan storage') { - if (isInProgress) { - sentence = `Disk Usage Reporter initiated`; - } else if (statusType === 'success') { - sentence = `Disk Usage Reporter completed`; - } else if (statusType === 'failed') { - sentence = `Disk Usage Reporter failed`; - } else { - sentence = `Disk Usage Reporter results`; - } - } else if (action === 'scan system') { - if (isInProgress) { - sentence = `System Metrics Scanner initiated`; - } else if (statusType === 'success') { - sentence = `System Metrics Scanner completed`; - } else if (statusType === 'failed') { - sentence = `System Metrics Scanner failed`; - } else { - sentence = `System Metrics Scanner results`; - } - } else if (action === 'scan docker') { - if (isInProgress) { - sentence = `Docker Image Scanner initiated`; - } else if (statusType === 'success') { - sentence = `Docker Image Scanner completed`; - } else if (statusType === 'failed') { - sentence = `Docker Image Scanner failed`; - } else { - sentence = `Docker Image Scanner results`; + sentence = `${verb} ${noun} results`; } } else if (action === 'update agent') { if (isInProgress) {