refactor(i18n): U31 AIOps Agent CLI 组件 i18n 修复 — Q7/Q35 拆分后丢失的 i18n 集成全部修复

6 个文件迁移 (AgentCLI + AgentCLIToolbar + AgentCLIHistory + AgentCLIEmptyState + ChatInputArea + agent-cli-constants.ts):
- 新增 aiops.cli.* 命名空间 100 翻译键 (10 子分类)
- SAFETY_MODES/TIPS_HOST/TIPS_KUBERNETES 常量改为 getSafetyModes(t)/getTipsHost(t)/getTipsKubernetes(t) 工厂函数
- 全部 UI 硬编码中文清零 (66→0)
- zh/en 7381→7481 +100 键对齐
- tsc -b=0, npm build✓ (18.21s), ESLint=0/53/0, go build=0, 17/17 测试通过
This commit is contained in:
attacker committed 2026-07-12 12:17:47 +08:00
1 parent 6dfddb426c
commit 4f2d279865
9 files changed
+461 -128

No files matched your search

+133 -1
View File
@@ -7886,7 +7886,139 @@
"predictIn7d": "In 7 days",
"predictIn30d": "In 30 days",
"agentCliErrorOccurred": "Error occurred",
"agentCliNoOutput": "(no output)"
"agentCliNoOutput": "(no output)",
"cli": {
"host": "Host",
"toolbar": {
"selectServer": "Select target host",
"cluster": "Cluster",
"namespace": "Namespace",
"podOptional": "Pod (optional)",
"podSearch": "Search Pod name",
"podNone": "No Pod selected (cluster/NS level tasks)",
"podNoMatch": "No matching Pods",
"safetyTitle": "Safety Mode Description",
"safetyDesc": "Controls whether you need to confirm before AI executes remote commands. Dangerous commands are always blocked in all modes.",
"safetyRecommended": "Recommended",
"safetyExample": "e.g.",
"historyExpand": "Expand history tasks",
"historyCollapse": "Collapse history tasks",
"historyLabel": "History",
"connected": "Connected",
"viewRecord": "View Record",
"canContinue": "Can Continue",
"capabilitiesTitle": "Core Capabilities",
"capabilitiesTooltip": "Core Capabilities",
"round": "Round {{round}} / {{tokens}}t"
},
"safety": {
"strict": {
"label": "Strict",
"short": "Medium risk + confirm",
"desc": "Medium-risk and above commands (chmod, file modifications, service restarts) require confirmation. Suitable for production or unfamiliar hosts.",
"examples": "chmod, mv, systemctl restart"
},
"balanced": {
"label": "Balanced",
"short": "High risk + confirm",
"desc": "Daily troubleshooting commands (viewing logs, ps, df) run automatically; only high-risk operations like file deletion or service restarts require confirmation. Recommended for daily use.",
"examples": "cat/grep/df auto / rm/reboot confirm"
},
"permissive": {
"label": "Permissive",
"short": "Block danger only",
"desc": "Except for dangerous commands which are hard-blocked, everything else runs automatically. Only suitable for isolated test environments.",
"examples": "rm -rf / blocked / rest auto"
}
},
"tips": {
"host": {
"llmTitle": "LLM + Tool Layer",
"llmDesc": "OpenAI-compatible LLM; tools include ssh_execute (remote execution) and analyze_output (output analysis).",
"shieldTitle": "Security + Prompt",
"shieldDesc": "Five-level risk assessment + three-level safety mode; dangerous commands hard-rejected, high-risk commands require confirmation.",
"brainTitle": "ReAct Core Engine",
"brainDesc": "Think-Act-Observe loop (max 16 rounds), retries with different approaches on failure, loop detection prevents infinite loops.",
"dbTitle": "Self-Evolution Engine",
"dbDesc": "Four-layer memory async learning, automatically injects historical experience for similar tasks, gets smarter with use."
},
"k8s": {
"cloudTitle": "Kubernetes Query",
"cloudDesc": "kubernetes_get unified query for nodes/Pods/Deployments/events; pod_logs fetches container logs.",
"terminalTitle": "Pod Execution",
"terminalDesc": "After selecting a Pod, use pod_execute to enter the container for troubleshooting; kubernetes_action performs restarts/scaling and other changes.",
"shieldTitle": "Security + ReAct",
"shieldDesc": "Read-only tools run automatically; changes and dangerous commands require confirmation, max 16 rounds of troubleshooting.",
"dbTitle": "Self-Evolution Engine",
"dbDesc": "Learns per cluster/namespace bucket, Kubernetes troubleshooting tasks become more accurate with use."
}
},
"subtitleHost": "Natural language driven SSH autonomous troubleshooting and deployment",
"subtitleK8s": "Natural language driven Kubernetes cluster queries and Pod troubleshooting",
"error": {
"connectTimeoutK8s": "Cluster connection timeout: please check cluster credentials and LLM configuration and retry.",
"connectTimeoutHost": "Host connection timeout: please check SSH credentials and LLM configuration and retry.",
"connectRejectedK8s": "Cluster connection rejected: please check cluster kubeconfig/token configuration and whether LLM is enabled.",
"connectRejectedHost": "Host connection rejected: please confirm SSH credentials and LLM configuration and retry.",
"selectServer": "Please select a target host first",
"selectCluster": "Please select a cluster and namespace first",
"notReady": "Connection not ready, please check LLM configuration or refresh the page",
"notReadyRetry": "Connection not ready, please try again later"
},
"info": {
"connectionClosed": "Connection closed",
"viewHistory": "Viewing history: {{title}} ({{status}}) - read-only, click \"Continue\" to resume execution",
"resuming": "Resuming session \"{{title}}\"..."
},
"statusDone": "Completed",
"viewMode": {
"readOnly": "History (read-only) - {{title}}",
"continueBtn": "Continue",
"newTask": "New Task"
},
"placeholder": {
"viewMode": "View mode, click \"Continue\" or \"New Task\"",
"continueInput": "Continue, press Enter to send (Shift+Enter for new line)",
"inputTask": "Describe your task, press Enter to send (Shift+Enter for new line)",
"selectClusterNs": "Please select a cluster and namespace first",
"selectServerShort": "Please select a target host first"
},
"history": {
"loadFailed": "Failed to load history sessions",
"detailFailed": "Failed to load session details",
"deleteTitle": "Delete Session",
"deleteDesc": "Are you sure you want to delete \"{{title}}\"? This action cannot be undone.",
"deleted": "Deleted",
"deleteFailed": "Delete failed",
"label": "History",
"newBtn": "New",
"collapseHistory": "Collapse history",
"selectK8s": "Select cluster and namespace to view",
"selectHost": "Select a host to view",
"noHistory": "No history",
"viewHistory": "View history record",
"rounds": "{{rounds}} rounds / {{tokens}}t",
"statusDone": "Done",
"statusRunning": "Running",
"statusAborted": "Aborted",
"statusError": "Error"
},
"empty": {
"selectK8s": "Please select a cluster and namespace first",
"selectHost": "Please select a target host first",
"connectingK8s": "Connecting to cluster...",
"connectingHost": "Connecting to host...",
"readyK8s": "Describe a Kubernetes troubleshooting task, e.g. \"Check NotReady nodes\" or \"Analyze nginx Pod restart cause\"",
"readyHost": "Describe the task you want to execute, e.g. \"Check disk usage and clean up large files\"",
"currentSafety": "Current safety mode: {{label}} ({{short}})",
"noPod": " / No Pod selected, cluster/NS level queries only"
},
"input": {
"hint": "Shift+Enter for new line / Enter to send",
"stop": "Stop",
"execute": "Run"
}
}
},
"breadcrumb": {
"dashboard": "Dashboard",