优化: AI模块(provider重试兼容+aichat交互+工具卡片可读化+diff高亮)
This commit is contained in:
@@ -8,11 +8,15 @@ export default {
|
||||
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.',
|
||||
@@ -21,6 +25,15 @@ export default {
|
||||
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.',
|
||||
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}',
|
||||
approvalTimeout: '⚰ Approval timed out, automatically rejected: {toolName}',
|
||||
// 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}',
|
||||
},
|
||||
}
|
||||
|
||||
+20
-1
@@ -18,7 +18,10 @@ export default {
|
||||
// ── Header buttons ──
|
||||
conversationList: 'Chat list',
|
||||
maximize: 'Maximize',
|
||||
pendingApprovalCount: '{n} pending',
|
||||
pendingApprovalHint: 'Click to jump to the first pending approval',
|
||||
restoreSidebar: 'Restore sidebar',
|
||||
sidebarResizeHint: 'Drag to resize sidebar',
|
||||
detachWindow: 'Detach window',
|
||||
closePanel: 'Close panel',
|
||||
dockRight: 'Dock to main window right',
|
||||
@@ -32,11 +35,22 @@ export default {
|
||||
providerNotConfigured: 'No AI provider configured. Please add one in settings.',
|
||||
notConfigured: 'Not configured',
|
||||
|
||||
// ── Empty states ──
|
||||
// ── Empty states (UX-2025-20: example prompt cards + no-provider guidance) ──
|
||||
emptyNoProvider: 'No AI provider configured',
|
||||
emptyNoProviderHint: 'Please add a provider in settings to start chatting',
|
||||
emptyTitle: 'Chat with AI assistant',
|
||||
emptyHint: 'Try "create a project" or "list all tasks"',
|
||||
// Example prompt cards: click to fill and send (4 prompts, DevFlow scenarios)
|
||||
examplePrompt1: 'Analyze this project’s dependencies',
|
||||
examplePrompt2: 'Help me write a workflow node',
|
||||
examplePrompt3: 'List all current tasks',
|
||||
examplePrompt4: 'Generate a project idea',
|
||||
goToSettings: 'Open settings',
|
||||
goToSettingsHint: 'The detached window cannot open settings directly. Configure AI providers on the main window’s Settings page.',
|
||||
|
||||
// ── Provider switch feedback (UX-2025-14) ──
|
||||
providerSwitched: 'Switched to {model}',
|
||||
providerSwitchHint: 'Current model: {model}',
|
||||
|
||||
// ── Back to bottom ──
|
||||
backToBottom: 'Back to bottom',
|
||||
@@ -63,5 +77,10 @@ export default {
|
||||
clearChat: 'Clear',
|
||||
confirmClearChat: 'Are you sure you want to clear all messages in this chat? This cannot be undone.',
|
||||
toastSendFail: 'Send failed: {msg}',
|
||||
|
||||
// ── Message copy (F-260615-13) ──
|
||||
copyMsg: 'Copy message',
|
||||
copied: 'Copied',
|
||||
copyFailed: 'Copy failed',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,9 +3,14 @@ export default {
|
||||
running: 'Running…',
|
||||
approve: 'Approve',
|
||||
reject: 'Reject',
|
||||
approveAll: 'Approve All ({n})',
|
||||
rejectAll: 'Reject All',
|
||||
rejectedHint: 'User rejected this action',
|
||||
// B-260616-12: tool execution slow hint (frontend fallback, no backend cancel IPC)
|
||||
executionSlow: 'Tool "{name}" is taking longer than expected, please wait…',
|
||||
collapse: 'Collapse',
|
||||
expandAll: 'Expand all',
|
||||
collapseAll: 'Collapse all',
|
||||
written: 'written',
|
||||
items: 'items',
|
||||
lines: 'lines',
|
||||
@@ -45,5 +50,28 @@ export default {
|
||||
|
||||
projectLabel: '"{name}"',
|
||||
projectIdNotFound: '(project not found, id={id})',
|
||||
|
||||
// AE-2025-05: High-risk approval second confirm (ask once more before approve; misclick cancellable)
|
||||
confirmHighDelete: 'Permanently delete? This action cannot be undone',
|
||||
confirmHighExec: 'Run this command?',
|
||||
confirmHighGeneric: 'Proceed with this high-risk action?',
|
||||
|
||||
// Tool result detail format (plain-text result + approval placeholder appends arg summary)
|
||||
resultDetail: '{raw} ({detail})',
|
||||
|
||||
// Approval argument key labels
|
||||
argLabel: {
|
||||
id: 'ID',
|
||||
projectId: 'Project ID',
|
||||
name: 'Name',
|
||||
title: 'Title',
|
||||
description: 'Description',
|
||||
field: 'Field',
|
||||
value: 'Value',
|
||||
path: 'Path',
|
||||
priority: 'Priority',
|
||||
tags: 'Tags',
|
||||
source: 'Source',
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user