优化: AI Chat全栈多批审查修复与架构清理(risk_level清理/路由解耦/工具渲染/测试补测/死代码)

This commit is contained in:
2026-06-18 22:57:19 +08:00
parent 0ca5d9805f
commit a2871a66e0
87 changed files with 5720 additions and 3012 deletions

View File

@@ -11,12 +11,17 @@ export default {
// UX-260616-01: tool execution failure marker (AR-6 keeps status=completed, red to distinguish from success)
executionFailed: 'Failed',
executionFailedHint: 'Tool execution failed, see details below',
// Singular expand/collapse (ToolCard single-card content, command output toggle; expandAll/collapseAll are for ToolCardList global multi-group)
expand: 'Expand',
collapse: 'Collapse',
expandAll: 'Expand all',
collapseAll: 'Collapse all',
written: 'written',
items: 'items',
lines: 'lines',
// UX-260618-08/11: truncation hints (read_file paged truncation / list_directory 1000-entry cap)
linesTruncated: '{shown}/{total} lines, truncated',
dirTruncated: 'Truncated, first {n} items only',
readPrefix: 'Read',
readFallback: 'Read File',
@@ -39,6 +44,9 @@ export default {
taskCount: '{n} tasks',
projectCount: '{n} projects',
ideaCount: '{n} ideas',
// UX-260618-10/12: list_trash collapsed header count + paged has_more hint (backend returns {items,total,has_more} object)
trashCount: '{n} in trash',
listHasMore: '({n} shown, more available)',
createdWithName: 'Created: {name}',
created: 'Created',
updatedField: 'Updated {field}',
@@ -50,22 +58,38 @@ export default {
purged: 'Purged',
purgeIneffective: 'Purge ineffective',
workflowHint: 'Run it on the workflow page',
// UX-260618-05: run_workflow tool_result shows execution_id (workflowHint misleading — workflow already triggered; old key kept for other refs)
workflowTriggered: 'Task {id} triggered workflow (advancing to {status}, execution {exec})',
workflowTriggeredShort: 'Execution {exec}',
// UX-260616-04: formatToolResult covers all tools with human-readable summaries (missing keys)
updatedTaskField: 'Task {id} updated field {field}',
advancedTask: 'Task {id} advanced to {status}',
// UX-260618-09: advance_task return-round accumulation (shown only when >0)
advancedTaskWithRounds: 'Task {id} advanced to {status} (returned {n} times)',
commandOk: 'Command succeeded ({ms} ms)',
commandFailed: 'Command failed (exit code {code})',
commandOutputLines: '{n} lines of output',
patchedFile: 'Patched {path} ({diff} bytes)',
// UX-260618-06: patch_file multi-match hint + size_diff unit
patchedMatches: 'matched {n} places',
bytesUnit: 'bytes',
patchedNoChange: '{path} no change',
appendedTo: 'Appended {bytes} to {path}',
renamedFile: 'Renamed {from} → {to}',
// UX-260618-12: rename_file bytes/cross-volume + write_file overwrite/encoding hints
renamedWithBytes: 'Renamed {from} → {to} ({bytes})',
renamedCrossVolume: 'Moved {from} → {to} (cross-volume, {bytes})',
writeOverwrite: 'overwrote {old} → {neww}',
encodingLabel: 'encoding: {enc}',
foundN: 'Found {n}',
boundDir: 'Bound directory "{path}" stack: {stack}',
deleteFilePermanent: 'Permanently deleted {path}',
deleteFileSoft: 'Soft-deleted {path} (backed up)',
// UX-260618-07: soft-delete adds backup_path (trash filename so user knows where to recover from)
deleteFileSoft: 'Soft-deleted {path} (backed up, recover from: {backup_path})',
fileInfoSize: '{path} {size}',
// UX-260618-12: file_info modified time (epoch_ms → client toLocaleString)
fileInfoModified: ' · modified {time}',
fileInfoLines: ' · {n} lines',
fileInfoBinary: ' · binary',
fileInfoDir: ' · directory',