Files
DevFlow/src/i18n/en/aiTool.ts
T

205 lines
9.2 KiB
TypeScript

export default {
aiTool: {
running: 'Running…',
approve: 'Approve',
reject: 'Reject',
approveAll: 'Approve All ({n})',
rejectAll: 'Reject All',
rejectedHint: 'User rejected this action',
// tool execution slow hint (frontend fallback, no backend cancel IPC)
executionSlow: 'Tool "{name}" is taking longer than expected, please wait…',
// approval pending duration hint (>2min orange, >5min red)
waitTime: '⏱ Waiting {time}',
// approval expiry countdown (BUG-260624-02, aligned with frontend auto-reject, red ≤60s)
expireIn: '⏳ Auto-reject in {time}',
// 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)
expand: 'Expand',
collapse: 'Collapse',
written: 'written',
items: 'items',
lines: 'lines',
// Status dot tooltips (ToolCard green/red/blue dot hover, zh-en paired)
statusOk: 'Success',
statusFailed: 'Failed',
statusRunning: 'Running',
statusPending: 'Pending approval',
statusRejected: 'Rejected',
// 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',
dirPrefix: 'Dir',
dirFallback: 'List Directory',
writePrefix: 'Write',
writeFallback: 'Write File',
// grep cross-file content search header
grepPrefix: 'Search',
grepFallback: 'Content Search',
// CRUD tool display names (delete/restore/purge/update_project resolve project name by id; fallback when no id or unresolved)
deletePrefix: 'Delete Project',
deleteFallback: 'Delete Project',
restorePrefix: 'Restore Project',
restoreFallback: 'Restore Project from Trash',
purgePrefix: 'Purge Project',
purgeFallback: 'Purge Project',
updatePrefix: 'Update Project',
updateFallback: 'Update Project',
createTask: 'Create Task',
createProject: 'Create Project',
taskCount: '{n} tasks',
projectCount: '{n} projects',
ideaCount: '{n} ideas',
// 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}',
updated: 'Updated',
deleted: 'Deleted',
deleteIneffective: 'Delete ineffective',
restored: 'Restored',
restoreIneffective: 'Restore ineffective (not in trash)',
purged: 'Purged',
purgeIneffective: 'Purge ineffective',
workflowHint: 'Run it on the workflow page',
// 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}',
// formatToolResult covers all tools with human-readable summaries (missing keys)
updatedTaskField: 'Task「{title}」 updated field {field}',
advancedTask: 'Task「{title}」 advanced to {status}',
// advance_task return-round accumulation (shown only when >0); {title} = task name (TaskRecord), fallback id
advancedTaskWithRounds: 'Task「{title}」 advanced to {status} (returned {n} times)',
commandOk: 'Command succeeded ({time})',
commandFailed: 'Command failed (exit code {code})',
commandOutputLines: '{n} lines of output',
patchedFile: 'Patched {path} ({diff} bytes)',
// 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}',
// 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}',
// http_request result summary (method + status + elapsed; body in expanded view)
httpOk: '{method} {status} OK ({time})',
httpFailed: '{method} {status} failed',
httpTruncated: 'Response truncated ({bytes}), see details',
httpRequestFallback: 'HTTP Request',
foundN: 'Found {n}',
// fetch_url result (render_mode badge + obscura install guidance)
// - fetchUrlTitle: header subtitle when title present
// - fetchUrlRendered: render_mode=obscura (JS render success) badge text
// - fetchUrlStatic: render_mode=static/static_fallback (static) badge text
// - fetchUrlFallbackHint: static_fallback (obscura missing/failed) summary, hints static fallback
// - fetchUrlChars: static-mode markdown char count (collapsed subtitle)
// - charsUnit: char unit (joined with length)
// - installObscura: "Install via AI" button label
// - obscuraInstallPrompt: dialog auto-sent to AI on button click (cargo install + releases options)
fetchUrlTitle: 'Title: {title}',
fetchUrlRendered: 'JS rendered',
fetchUrlStatic: 'static',
fetchUrlFallbackHint: 'obscura not installed, fell back to static mode (JS rendering unavailable)',
fetchUrlChars: '{n} chars',
charsUnit: 'chars',
// fetch_url header display name (useToolCardHeader): host-shortened prefix + fallback when no url
fetchUrlPrefix: 'Fetch',
fetchUrlFallback: 'Fetch URL',
installObscura: 'Install obscura via AI',
obscuraInstallPrompt: 'Please install obscura (a Rust headless browser, used by fetch_url render=true for JS rendering). Try `cargo install obscura` first; if cargo is unavailable, download the prebuilt binary for this platform from the GitHub releases (github.com/h4ckf0r0day/obscura) and place it on PATH. After installing, verify with `obscura --version` and tell me I can retry the web fetch.',
// grep cross-file content search results per output_mode phrasing
grepHitsN: '{n} hits',
grepFilesN: '{n} files',
grepCountSummary: '{n} hits / {files} files',
grepCountLines: '{n} hits',
grepTruncated: 'Results truncated (max reached), narrow pattern or add glob',
boundDir: 'Bound directory "{path}" stack: {stack}',
deleteFilePermanent: 'Permanently deleted {path}',
// 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}',
// file_info modified time (epoch_ms → client toLocaleString)
fileInfoModified: ' · modified {time}',
fileInfoLines: ' · {n} lines',
fileInfoBinary: ' · binary',
fileInfoDir: ' · directory',
fileInfoMissing: '{path} does not exist',
projectLabel: '"{name}"',
projectIdNotFound: '(project not found, id={id})',
// advance_task/run_workflow task_id → task title (store.tasks lookup; fallback id)
taskLabel: '"{name}"',
taskIdNotFound: '(task not in current list, id={id})',
// 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})',
// ToolCardList group header (shown when 2+ same-name tools; was hardcoded zh)
toolGroup: {
readFile: 'Read File',
writeFile: 'Write File',
listDirectory: 'List Directory',
grep: 'Content Search',
createTask: 'Create Task',
createProject: 'Create Project',
createIdea: 'Create Idea',
listTasks: 'List Tasks',
listProjects: 'List Projects',
listIdeas: 'List Ideas',
deleteProject: 'Delete Project',
restoreProject: 'Restore Project',
purgeProject: 'Purge Project',
updateProject: 'Update Project',
runWorkflow: 'Run Workflow',
httpRequest: 'HTTP Request',
},
// approval loading fallback timeout notice (no backend ack, card still pending_approval → reset + prompt)
approveLoadingTimeout: 'Approval response timed out, please retry or check the backend',
// tool failure detection copy (regex narrowed to line-anchored err_msg prefix)
// (reuse executionFailed/executionFailedHint, no new key)
// http_request High-risk confirm: external network call, data may leak via URL/body
confirmHighHttp: 'Send this HTTP request to an external server?',
// 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',
method: 'Method',
url: 'URL',
body: 'Body',
headers: 'Headers',
timeout_secs: 'Timeout (s)',
parse: 'Parse',
},
},
}