Files
DevFlow/src/i18n/en/ai.ts
T
lxy c480627ba6 优化: 批A前端(timer所有权+会话族+审批conv-scoped+FilePreview+失败反馈)
A1-B1 timer所有权:新建 useTimerOwnership composable(每实例独立ref+onUnmounted清理)+ useToast _timer 下沉 + Ideas debounce 补清理(治跨实例串扰)

A1-B2 FilePreview:reqSeq 双计数器守卫(loadFile/loadDiff 最新seq才写,防乱序覆盖)+ mermaid securityLevel strict + filePath 比对(防跨文件SVG注入)

A1-B3 会话族:load_more 滚顶加载接线(switch透传has_more/earliest_seq+prepend去重+scrollTop恢复)+ switch失败保留视图+报错(仅对话不存在才create-new)+ new/delete失败反馈(withConvOp helper收敛)+ delete清ai_messages孤儿

A1-B5前端契约:isToolFailure 三处加 success===false 判定(useToolCard/ToolResultBody/ToolCard,git只读失败不再绿框)

A2-B10 审批conv-scoped:pendingApprovals 补conversationId + cleanup 按convId filter + 移除全局清(AiError不再误清其他conv)+ :676 dir auth filter方向修

usage打标前端:is_estimated 字段+事件透传+MessageList『估算』角标(详情面板说明)

A2-B9前端:clearChat try/catch 错误气泡
2026-08-05 22:10:50 +08:00

62 lines
4.2 KiB
TypeScript

export default {
ai: {
assistant: 'AI Assistant',
toolName: {
readFile: 'Read File',
listDirectory: 'List Directory',
writeFile: 'Write File',
fileInfo: 'File Info',
appendFile: 'Append File',
searchFiles: 'Search Files',
patchFile: 'Patch File',
deleteFile: 'Delete File',
renameFile: 'Rename/Move File',
},
aiTool: {
fileInfoDesc: 'Get file or directory metadata (exists, size, line count, modified time, is binary, is directory) without reading content',
appendFileDesc: 'Append content to end of file. Creates file if not exists. Returns bytes written and new file size',
searchFilesDesc: 'Search for files matching a pattern (case-insensitive substring match) in a directory. Supports recursive search, max 50 results with total count and has_more flag',
renameFileDesc: 'Rename or move a file (one tool covers both rename and move). from=source path, to=target path, overwrite=default false (reject if target exists). Atomic rename on same volume, auto copy+remove across volumes',
},
errorNotFound: 'Request failed: the endpoint or model does not exist. Please check the Provider configuration.',
errorAuth: 'Request failed: the API key is invalid or lacks permission.',
errorTimeout: 'The response timed out. Please try again.',
errorNetwork: 'Network connection failed. Please check your network.',
// CR-30-2 / F-260616-07(d) / decision a1: stream pre-failure retry bubble copy
// UX-260616-01: clarify this is an AI response (network/rate-limit) retry, not a tool failure (shown in card)
aiStreamRetry: '⚠ AI response failed, retrying ({attempt}/{max})…',
// UX-260616-01: Fatal errors (4xx/auth) are not retryable — prompt user to check settings instead
notRetryable: 'This error cannot be resolved by retrying. Please check the configuration.',
streamInterruptedAfterTool: '⚠ The tool finished, but the following reply was interrupted (no data stream for a long time). You can click Continue to retry.',
streamInterrupted: '⚠ The response was interrupted (no data stream for a long time). This may be due to a network disconnection or a backend error. Please try again.',
// UX-2025-04 / CR-30-2 / decision a1: system notice bubble after mid-stream failure preserve (frontend mirrors backend session.messages)
responseIncomplete: '⚠ The response is incomplete due to a network interruption. The above is the partial content received. You can resend to get a full reply.',
queueFull: 'Send queue is full (max {limit} items)',
forceSendConfirm: 'AI generation appears stuck. Force-stop and send anyway? (This may interrupt the current response)',
forceSendBtn: 'Force Send',
queueTimedOut: 'Queue timed out',
approvalNotDelivered: 'Approval operation failed to reach the backend: {error}',
queuedSendFailed: 'Failed to send queued message: {error}',
approvalTimeout: '⚰ Approval timed out, automatically rejected: {toolName}',
// UX-260617-08: conversation load/switch failure feedback (network jitter/IPC down → empty list/blank, was silent)
loadConvFail: 'Failed to load conversations. Please check your network or backend connection.',
switchConvFail: 'Failed to switch conversation. Please retry.',
// M30: rename/archive/pin IPC failure feedback (was no try/catch, exceptions leaked to unhandledrejection)
renameConvFail: 'Failed to rename. Please retry.',
archiveConvFail: 'Failed to {action}. Please retry.',
pinConvFail: 'Failed to {action}. Please retry.',
// G3.4: new/delete conversation failure feedback (was bare await → unhandledrejection, user no feedback)
newConvFail: 'Failed to create a new conversation. Please retry.',
deleteConvFail: 'Failed to delete conversation. Please retry.',
archiveAction: 'archive',
unarchiveAction: 'unarchive',
pinAction: 'pin',
unpinAction: 'unpin',
// AE-2025-07: Agentic loop progress bar copy
// Note: max round / completed tool count are not surfaced by backend this round;
// template conditionally omits them. Add *WithMax keys once backend exposes them.
agenticProgress: '🔄 Round {round} · ⏳{pending} pending',
agenticProgressNoPending: '🔄 Round {round} · ✅{completed} tools done',
},
}