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

This commit is contained in:
lxy
2026-06-18 22:57:19 +08:00
parent 0ca5d9805f
commit a2871a66e0
87 changed files with 5720 additions and 3012 deletions
+5 -1
View File
@@ -20,6 +20,7 @@ export default {
today: 'Today',
yesterday: 'Yesterday',
earlier: 'Earlier',
groupEmpty: 'None',
// ── Header buttons ──
conversationList: 'Chat list',
@@ -155,7 +156,10 @@ export default {
clearContext: 'Clear context',
compressContext: 'Compress context',
// Confirm dialog (clear is semantically irreversible; history archived, not deleted)
clearContextConfirm: 'Clear the current chat context? History is archived and preserved; new chats are not affected.',
// Title "Clear context" folded into the lead sentence; stress irreversible + archived segment + AI no longer sees history
clearContextConfirm: 'Clear context? This action is irreversible. The current chat context will be archived as a segment (the AI will no longer see these history messages). New chats are not affected.',
// Danger button label for the confirm dialog (ConfirmDialog dangerLabel); falls back to common.confirm if omitted
clearContextDangerLabel: 'Clear',
// Collapsed separator (consecutive same-status merged into one bar; {n}=merged message count)
contextArchived: 'Archived {n} messages',
compressed: 'Context compressed',
+25 -1
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',
+46
View File
@@ -0,0 +1,46 @@
export default {
auditLog: {
title: 'Approval History',
refresh: 'Refresh',
desc: 'AI tool call audit records (newest first). Arguments and results show summaries only; full data persists in the local database.',
loading: 'Loading…',
empty: 'No audit records',
col: {
time: 'Requested',
tool: 'Tool',
risk: 'Risk',
status: 'Status',
decided: 'Decided by',
args: 'Args summary',
result: 'Result summary',
},
pager: {
prev: 'Prev',
next: 'Next',
page: 'Page {n}',
last: '(last)',
},
risk: {
low: 'Low',
medium: 'Med',
high: 'High',
},
status: {
pending: 'Pending',
approved: 'Approved',
rejected: 'Rejected',
executing: 'Executing',
completed: 'Completed',
failed: 'Failed',
},
decided: {
human: 'Human',
auto: 'Auto',
},
},
}
+7
View File
@@ -0,0 +1,7 @@
export default {
error: {
title: 'Render Error',
desc: 'This section failed to render due to an internal error. Try reloading.',
retry: 'Retry',
},
}
+1 -3
View File
@@ -51,11 +51,9 @@ export default {
fetchFailedNotFound: 'Endpoint not found, this vendor may not support model listing: {msg}',
toastModelEditLocalOnly: 'Enabled / weight are local edits, overwritten on next fetch',
// Model trait tags (4 dimensions + probe source)
// Model trait tags (modality + capability + probe source; cost/intel 去除见 UX-260618-04)
tagModality: { text: 'Text', vision: 'Vision', audio: 'Audio', video: 'Video' },
tagCapability: { tool_use: 'Tool use', embedding: 'Embedding', code_gen: 'Code' },
tagCost: { free: 'Free', low: 'Low', medium: 'Medium', high: 'High' },
tagIntel: { lite: 'Lite', standard: 'Standard', plus: 'Plus', ultra: 'Ultra' },
tagSource: { user_set: 'Manual', preset_table: 'Preset', heuristic: 'Heuristic', default: 'Default' },
// ===== Connection panel =====
+1
View File
@@ -27,6 +27,7 @@ export default {
group: {
taskCount: '{n} tasks',
unknownProject: 'Unknown Project',
empty: 'No tasks yet',
},
// New task modal