diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 3b8c0e91..9e915561 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -163,15 +163,25 @@ "terminal": { "title": "AWOOOI Terminal", "version": "Version", - "waiting": "Waiting for command...", + "waiting": "> Waiting for command...", "initiate": "INITIATE SYNC", - "executing": "EXECUTING...", - "events": "events", - "stream": "STREAM", + "executing": ">_ EXECUTING...", + "events": "{count} events", + "stream": "STREAM: /agent/thinking", "waitingForData": "Waiting for decision chain data...", "steps": "Steps", "streaming": "Streaming", - "paused": "Paused" + "paused": "Paused", + "blastRadius": "[ BLAST RADIUS ]", + "rootCauseChain": "[ ROOT CAUSE CHAIN ]", + "upstreamImpact": "[ UPSTREAM IMPACT ]", + "downstreamDependencies": "[ DOWNSTREAM DEPENDENCIES ]", + "dependsOn": "depends on", + "calls": "calls", + "finopsAnalysis": "[ FINOPS ANALYSIS ]", + "wastedPerMonth": "Wasted/mo", + "realizable": "Realizable", + "freed": "Freed" }, "omniTerminal": { "title": "OMNI-TERMINAL", diff --git a/apps/web/messages/zh-TW.json b/apps/web/messages/zh-TW.json index b1e784df..6987aa06 100644 --- a/apps/web/messages/zh-TW.json +++ b/apps/web/messages/zh-TW.json @@ -163,15 +163,25 @@ "terminal": { "title": "AWOOOI 終端機", "version": "版本", - "waiting": "等待指令...", + "waiting": "> 等待指令...", "initiate": "啟動同步", - "executing": "執行中...", - "events": "事件", - "stream": "串流", + "executing": ">_ 執行中...", + "events": "{count} 事件", + "stream": "串流: /agent/thinking", "waitingForData": "等待決策鏈資料...", "steps": "步驟", "streaming": "串流中", - "paused": "已暫停" + "paused": "已暫停", + "blastRadius": "[ 爆炸半徑 ]", + "rootCauseChain": "[ 根因分析鏈 ]", + "upstreamImpact": "[ 上游影響 ]", + "downstreamDependencies": "[ 下游依賴 ]", + "dependsOn": "依賴", + "calls": "呼叫", + "finopsAnalysis": "[ FINOPS 分析 ]", + "wastedPerMonth": "每月浪費", + "realizable": "可實現", + "freed": "已釋放" }, "omniTerminal": { "title": "OMNI-TERMINAL", diff --git a/apps/web/src/components/agent/thinking-terminal.tsx b/apps/web/src/components/agent/thinking-terminal.tsx index 4f77f895..dc7a9a49 100644 --- a/apps/web/src/components/agent/thinking-terminal.tsx +++ b/apps/web/src/components/agent/thinking-terminal.tsx @@ -9,6 +9,7 @@ */ import { useEffect, useMemo } from 'react' +import { useTranslations } from 'next-intl' import { cn } from '@/lib/utils' import { useAgentStore, @@ -50,12 +51,13 @@ function DependencyPathVisualizer({ paths: string[] direction: 'upstream' | 'downstream' }) { + const t = useTranslations('terminal') if (paths.length === 0) return null return (
- {direction === 'upstream' ? '[ BLAST RADIUS ]' : '[ ROOT CAUSE CHAIN ]'} + {direction === 'upstream' ? t('blastRadius') : t('rootCauseChain')}
{paths.map((path, i) => ( @@ -84,13 +86,14 @@ function ServiceChainVisualizer({ target: string type: 'blast_radius' | 'root_cause' }) { + const t = useTranslations('terminal') // 建構 ASCII 風格的依賴圖 const isBlastRadius = type === 'blast_radius' return (
- {isBlastRadius ? '[ UPSTREAM IMPACT ]' : '[ DOWNSTREAM DEPENDENCIES ]'} + {isBlastRadius ? t('upstreamImpact') : t('downstreamDependencies')}
{/* ASCII Art 風格圖形 */} @@ -103,7 +106,7 @@ function ServiceChainVisualizer({ {' │ '}{services.slice(0, 3).join(', ').padEnd(19)}{'│'}
{' └─────────┬───────────┘'}
-
{' │ depends on'}
+
{` │ ${t('dependsOn')}`}
{' ▼'}
{' ┌─────────────────────┐'}
@@ -119,7 +122,7 @@ function ServiceChainVisualizer({ {' │ '}{target.padEnd(19)}{'│ '}!
{' └─────────┬───────────┘'}
-
{' │ calls'}
+
{` │ ${t('calls')}`}
{' ▼'}
{' ┌─────────────────────┐'}
@@ -157,9 +160,10 @@ function ServiceChainVisualizer({ // ==================== FinOps 視覺化 ==================== function FinOpsVisualizer({ data }: { data: NonNullable }) { + const t = useTranslations('terminal') return (
-
[ FINOPS ANALYSIS ]
+
{t('finopsAnalysis')}
{/* 成本摘要 */}
@@ -167,19 +171,19 @@ function FinOpsVisualizer({ data }: { data: NonNullable ${data.totalWastedUsd.toFixed(0)}
-
Wasted/mo
+
{t('wastedPerMonth')}
${data.realizableSavingsUsd.toFixed(0)}
-
Realizable
+
{t('realizable')}
${data.freedResourcesUsd.toFixed(0)}
-
Freed
+
{t('freed')}
@@ -305,6 +309,7 @@ export function ThinkingTerminal({ className, maxHeight = '300px', }: ThinkingTerminalProps) { + const t = useTranslations('terminal') const thinkingStream = useAgentStore(selectThinkingStream) const status = useAgentStore(selectAgentStatus) const error = useAgentStore(selectError) @@ -331,7 +336,7 @@ export function ThinkingTerminal({
-

AWOOOI Terminal

+

{t('title')}

v0.1.0 | SSE @@ -349,7 +354,7 @@ export function ThinkingTerminal({ : 'bg-nothing-white text-nothing-black border-transparent hover:bg-nothing-gray-200' )} > - {isStreaming ? '>_ EXECUTING...' : 'INITIATE SYNC'} + {isStreaming ? t('executing') : t('initiate')} {/* Terminal Output */} @@ -359,7 +364,7 @@ export function ThinkingTerminal({ > {thinkingStream.length === 0 && !isStreaming && !error && (
- {'>'} Waiting for command... + {t('waiting')}
)} @@ -379,10 +384,10 @@ export function ThinkingTerminal({ {/* Footer */}

- STREAM: /agent/thinking + {t('stream')}

- {thinkingStream.length} events + {t('events', { count: thinkingStream.length })}

diff --git a/apps/web/src/components/dashboard/live-host-card.tsx b/apps/web/src/components/dashboard/live-host-card.tsx index ec517f84..9192789b 100644 --- a/apps/web/src/components/dashboard/live-host-card.tsx +++ b/apps/web/src/components/dashboard/live-host-card.tsx @@ -324,7 +324,9 @@ function MetricBar({ criticalThreshold = 80, collectingLabel = '-', baselineValue, - baselineLabel = '基準線', + // Note: baselineLabel prop kept for future use but not used currently + // eslint-disable-next-line @typescript-eslint/no-unused-vars + baselineLabel, }: MetricBarProps) { // Handle null/undefined values - show collecting state if (value === null || value === undefined) {