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.
This commit is contained in:
@@ -472,45 +472,19 @@ const ChatTimeline: React.FC<ChatTimelineProps> = ({ agentId, className, isScope
|
|||||||
|
|
||||||
|
|
||||||
if (entry.type === 'command') {
|
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) {
|
if (isInProgress) {
|
||||||
sentence = `Package Update Scanner initiated`;
|
sentence = `${verb} ${noun} initiated`;
|
||||||
} else if (statusType === 'success') {
|
} else if (statusType === 'success') {
|
||||||
sentence = `Package Update Scanner completed`;
|
sentence = `${verb} ${noun} completed`;
|
||||||
} else if (statusType === 'failed') {
|
} else if (statusType === 'failed') {
|
||||||
sentence = `Package Update Scanner failed`;
|
sentence = `${verb} ${noun} failed`;
|
||||||
} else {
|
} else {
|
||||||
sentence = `Package Update Scanner results`;
|
sentence = `${verb} ${noun} 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`;
|
|
||||||
}
|
}
|
||||||
} else if (action === 'update agent') {
|
} else if (action === 'update agent') {
|
||||||
if (isInProgress) {
|
if (isInProgress) {
|
||||||
|
|||||||
Reference in New Issue
Block a user