新增: Phase2 阶段收尾(Sprint 1-20)

重构:删 5 零引用 crate(df-evolve/plugin/stages/task/traceability)+ 清死模块、ai.rs 拆 11 子 module、ai.ts 拆 6 composable、i18n 拆目录
功能:知识库全栈(df-project/scan + CRUD + 时间线 + 前端)、Settings 拆分、appSettings KV 迁移、模型池、LLM 并发 Semaphore
修复:审批持久化根治、ConditionEngine 默认拒绝、NodeRegistry unimplemented 清除、promote 补偿删除、工具结果截断 50KB、路径校验防 symlink 逃逸
文档:B-03 人工审批设计、决策记录三分档、规格契约自检、经验记录、todo 看板、PROGRESS 更新

详见 PROGRESS.md。src-tauri/儿童每日打卡应用/ 与本项目无关,已排除。
This commit is contained in:
2026-06-14 14:08:20 +08:00
parent 98393b4908
commit cf017f81e2
167 changed files with 19549 additions and 6886 deletions

10
src/i18n/en/ai.ts Normal file
View File

@@ -0,0 +1,10 @@
export default {
ai: {
assistant: 'AI Assistant',
toolName: {
readFile: 'Read File',
listDirectory: 'List Directory',
writeFile: 'Write File',
},
},
}

64
src/i18n/en/aiChat.ts Normal file
View File

@@ -0,0 +1,64 @@
export default {
aiChat: {
// ── Conversation sidebar ──
sidebarTitle: 'Chats',
newConversation: 'New chat',
doubleClickToRename: 'Double-click to rename',
archive: 'Archive',
unarchive: 'Unarchive',
archived: 'Archived',
archivedCount: 'Archived ({n})',
emptyConversation: 'No conversations',
// ── Time grouping (sidebar) ──
today: 'Today',
yesterday: 'Yesterday',
earlier: 'Earlier',
// ── Header buttons ──
conversationList: 'Chat list',
maximize: 'Maximize',
restoreSidebar: 'Restore sidebar',
detachWindow: 'Detach window',
closePanel: 'Close panel',
dockRight: 'Dock to main window right',
undock: 'Undock',
pinOnTop: 'Pin on top',
unpin: 'Unpin',
closeWindow: 'Close window',
// ── Provider status ──
clickToSwitchProvider: 'Click to switch provider',
providerNotConfigured: 'No AI provider configured. Please add one in settings.',
notConfigured: 'Not configured',
// ── Empty states ──
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"',
// ── Back to bottom ──
backToBottom: 'Back to bottom',
// ── Pending queue ──
queueTitle: 'Queued {n}/10',
clearQueue: 'Clear',
// ── Skill ──
clearSkill: 'Clear skill',
placeholderWithSkill: 'Skill selected. Type arguments and press Enter',
placeholderDefault: 'Type a message... (/ for skills)',
skillNoMatch: 'No matching skill',
skillNotLoaded: 'No local skills loaded',
// ── Send ──
stopGenerating: 'Stop generating',
// ── Input hint ──
inputHint: 'Enter to send · Shift+Enter for newline',
// ── Confirm dialog ──
confirmDeleteConversation: 'Delete chat "{title}"? This cannot be undone.',
},
}

31
src/i18n/en/aiTool.ts Normal file
View File

@@ -0,0 +1,31 @@
export default {
aiTool: {
running: 'Running…',
approve: 'Approve',
reject: 'Reject',
rejectedHint: 'User rejected this action',
collapse: 'Collapse',
expandAll: 'Expand all',
written: 'written',
items: 'items',
lines: 'lines',
readPrefix: 'Read',
readFallback: 'Read File',
dirPrefix: 'Dir',
dirFallback: 'List Directory',
writePrefix: 'Write',
writeFallback: 'Write File',
taskCount: '{n} tasks',
projectCount: '{n} projects',
ideaCount: '{n} ideas',
createdWithName: 'Created: {name}',
created: 'Created',
updatedField: 'Updated {field}',
updated: 'Updated',
deleted: 'Deleted',
deleteIneffective: 'Delete ineffective',
workflowHint: 'Run it on the workflow page',
},
}

17
src/i18n/en/common.ts Normal file
View File

@@ -0,0 +1,17 @@
export default {
common: {
justNow: 'just now',
minutesAgo: '{n}m ago',
hoursAgo: '{n}h ago',
dayAgo: '{n}d ago',
yesterday: 'Yesterday',
ago: '{time} ago',
cancel: 'Cancel',
confirm: 'OK',
delete: 'Delete',
save: 'Save',
edit: 'Edit',
close: 'Close',
loading: 'Loading…',
},
}

View File

@@ -1,17 +1,4 @@
export default {
nav: {
overview: 'Overview',
ideas: 'Ideas',
projects: 'Projects',
tasks: 'Tasks',
knowledge: 'Knowledge',
decisions: 'Decisions',
settings: 'Settings',
workspace: 'Workspace',
traceability: 'Traceability',
systemReady: 'System Ready',
aiPanel: 'AI Panel',
},
dashboard: {
title: 'Overview',
subtitle: 'All systems operational',
@@ -59,20 +46,4 @@ export default {
rejected: 'Rejected',
},
},
ai: {
assistant: 'AI Assistant',
toolName: {
readFile: 'Read File',
listDirectory: 'List Directory',
writeFile: 'Write File',
},
},
common: {
justNow: 'just now',
minutesAgo: '{n}m ago',
hoursAgo: '{n}h ago',
dayAgo: '{n}d ago',
yesterday: 'Yesterday',
ago: '{time} ago',
},
}

79
src/i18n/en/ideas.ts Normal file
View File

@@ -0,0 +1,79 @@
export default {
ideas: {
// Page header
title: '💡 Ideas',
refresh: '🔄 Refresh',
capture: '✨ Capture Idea',
// Filter bar
searchPlaceholder: 'Search ideas...',
filter: {
all: 'All',
hot: 'Hot',
pending: 'Pending',
promoted: 'Promoted',
},
// Empty state
emptyState: 'Select an idea to view details',
// Adversarial evaluation
adversarialTitle: '⚖️ Adversarial Evaluation',
evalModeHeuristic: 'Heuristic',
positive: '📈 Pro',
negative: '📉 Con',
confidence: '{n}% confidence',
analystTitle: '🧠 AI Analyst Conclusion',
finalScore: 'Overall score: {score}/10',
netSentiment: 'Overall sentiment: {tone} ({n})',
sentimentPositive: 'Positive',
sentimentNegative: 'Cautious',
actionTitle: '💡 Action Items',
evaluating: '⏳ Evaluating…',
startEval: '🔍 Start Adversarial Eval',
// Assessment badges
assessment: {
'immediate action': '🚀 Act immediately',
soon: '📅 Act soon',
'with resources': '📦 Act with resources',
'research more': '🔍 Needs more research',
monitor: '👁️ Keep monitoring',
cancel: '❌ Cancel idea',
},
// Multi-dimensional score
multiScoreTitle: '📊 Multi-dim Score',
noEval: 'No evaluation yet',
// Tags
tagsTitle: '🏷️ Tags',
noTags: 'No tags yet',
// Status management
statusTitle: '📋 Status',
status: {
draft: '📝 Draft',
pending_review: '⏳ Pending',
approved: '✅ Approved',
promoted: '🚀 Promoted',
rejected: '❌ Rejected',
},
// Action buttons
promoteToProject: '🚀 Promote to Project',
deleteIdea: '🗑️ Delete Idea',
// Capture modal
captureTitle: '✨ Capture New Idea',
fieldTitle: 'Title',
fieldDesc: 'Description',
titlePlaceholder: 'Describe your idea in one sentence...',
descPlaceholder: 'More details (optional)...',
// Native dialog text (confirm / alert)
confirmDelete: 'Delete idea "{title}"? This cannot be undone.',
promoteFailed: 'Promotion failed',
evalFailed: 'Evaluation failed',
},
}

14
src/i18n/en/index.ts Normal file
View File

@@ -0,0 +1,14 @@
// 自动聚合本目录所有模块文件 —— 新增模块文件即生效,无需改此文件。
// 排除 index 自身。每个模块文件 export default 一个对象,顶层 key 合并进 messages。
const modules = import.meta.glob(['./*.ts'], { eager: true, import: 'default' }) as Record<
string,
Record<string, unknown>
>
const messages: Record<string, unknown> = {}
for (const [path, mod] of Object.entries(modules)) {
if (path.endsWith('index.ts')) continue
Object.assign(messages, mod)
}
export default messages

78
src/i18n/en/knowledge.ts Normal file
View File

@@ -0,0 +1,78 @@
export default {
knowledge: {
title: '📚 Knowledge Base',
add: '+ New Knowledge',
tab: {
library: 'Library',
inbox: 'Inbox',
},
searchPlaceholder: 'Search title, tags, content...',
categoryAll: 'All',
emptyInbox: '✅ No pending items',
emptyLibrary: '📭 No matching knowledge',
edit: '✏️ Edit',
publish: 'Publish',
reject: 'Reject',
archive: 'Archive',
reuseCount: '🔄 Reused {n} times',
confidenceBadge: 'Confidence: {label}',
contentLabel: 'Content',
tagsLabel: 'Tags',
tagsNone: 'None',
tagsPlaceholder: 'comma separated',
traceTitle: '🔍 Provenance',
traceMethod: 'Origin',
traceSource: 'Source conversation',
traceTime: 'Created at',
originExtracted: '🤖 Extracted by AI',
originManual: '✍️ Manually added',
originUnknown: '—',
reasoningLabel: '🤖 AI Reasoning',
refTitle: '🔄 References ({n})',
refEmpty: 'Not referenced yet',
loadMore: 'Load more ({n} left)',
lifecycleTitle: '📅 Lifecycle',
detailEmptyHint: 'Select a knowledge on the left to view its full lifecycle',
createTitle: 'New Knowledge',
kindLabel: 'Type',
titleLabel: 'Title',
titlePlaceholder: 'Short title',
contentPlaceholder: 'Reusable content',
tagsFieldLabel: 'Tags (comma separated)',
tagsFieldPlaceholder: 'Go, concurrency, context',
confidenceLabel: 'Confidence',
confidenceNone: 'Not set',
create: 'Create',
timeline: {
extracted: 'AI extracted',
created: 'Manually added',
published: 'Approved',
archived: 'Archived',
enterReview: 'Entered review',
referenced: 'Referenced',
statusChanged: 'Status → {to}',
summarySource: 'Source: {title}',
summaryConv: 'Conversation: {title}',
},
status: {
candidate: 'Pending',
pending_review: 'Reviewing',
published: 'Published',
archived: 'Archived',
},
confidence: {
high: 'High',
medium: 'Medium',
low: 'Low',
},
kind: {
review_rule: 'Review Rule',
prompt_template: 'Prompt Template',
pitfall: 'Pitfall',
architecture_pattern: 'Architecture Pattern',
diagnosis: 'Diagnosis',
deployment_note: 'Deployment Note',
workflow_optimization: 'Workflow Optimization',
},
},
}

15
src/i18n/en/nav.ts Normal file
View File

@@ -0,0 +1,15 @@
export default {
nav: {
overview: 'Overview',
ideas: 'Ideas',
projects: 'Projects',
tasks: 'Tasks',
knowledge: 'Knowledge',
decisions: 'Decisions',
settings: 'Settings',
workspace: 'Workspace',
traceability: 'Traceability',
systemReady: 'System Ready',
aiPanel: 'AI Panel',
},
}

View File

@@ -0,0 +1,54 @@
export default {
projectDetail: {
// Header
backToList: '← Projects',
sync: '🔄 Sync',
delete: '🗑 Delete',
newTask: '+ New Task',
// Stage pipeline
stageIdea: '💡 Idea',
stageRequirement: '📋 Requirement',
stageCoding: '💻 Coding',
stageTesting: '🧪 Testing',
stageRelease: '🚀 Release',
// New task modal
newTaskTitle: 'New Task',
taskTitleLabel: 'Task Title',
taskTitlePlaceholder: 'Enter task title',
descLabel: 'Description',
descPlaceholder: 'Brief description',
branchLabel: 'Branch Name',
confirmCreate: 'Create',
// Project info panel
infoTitle: '📋 Project Info',
sourceIdea: 'Source Idea',
viewIdea: 'View idea details',
ideaDeleted: 'Original idea deleted',
createdAt: 'Created',
updatedAt: 'Updated',
description: 'Description',
projectStatus: 'Status',
// Task list panel
taskListTitle: '🔀 Tasks',
taskCount: '{n} tasks',
emptyTasks: 'No tasks yet',
// Workflow log panel
workflowLogTitle: '📋 Workflow Log',
runDemoWorkflow: '▶ Run Demo Workflow',
emptyWorkflowLog: 'Click "Run Demo Workflow" to view live logs',
// Approval dialog
approvalTitle: 'Manual Approval Required',
approvalHint: 'Choose an action:',
approvalLater: 'Later',
// Delete confirm
confirmDelete: 'Delete project "{name}"? It will be moved to trash and can be restored.',
// Project directory
codeDirLabel: 'Code Directory',
noDirBound: 'Not bound',
relocateDir: 'Relocate',
bindDir: 'Bind Directory',
dirStatusLabel: 'Directory Status',
// Tech stack
techStackLabel: 'Tech Stack',
},
}

42
src/i18n/en/projects.ts Normal file
View File

@@ -0,0 +1,42 @@
export default {
projects: {
title: '📂 Projects',
// Header actions
create: '+ New Project',
trash: '🗑 Trash',
// New project modal
createTitle: 'New Project',
nameLabel: 'Project Name',
namePlaceholder: 'Enter project name',
descLabel: 'Project Description',
descPlaceholder: 'Briefly describe the project goal',
confirmCreate: 'Create',
// Trash modal
trashTitle: '🗑 Trash',
trashEmpty: 'Trash is empty',
movedIn: 'moved in',
restore: '↩ Restore',
purge: 'Delete Permanently',
// Project card
deleteTitle: 'Delete',
// Empty state
empty: 'No projects yet, click the top-right button to create your first project',
// Confirm prompts
confirmDelete: 'Delete project "{name}"? It will be moved to trash and can be restored.',
confirmPurge: 'Permanently delete project "{name}"? Tasks/branches/releases will be physically deleted and cannot be recovered!',
// New fields
codeDirLabel: 'Code Directory',
codeDirPlaceholder: 'Click the button on the right to select project directory',
selectDir: 'Select Directory',
clearDir: 'Clear',
// Status labels (PROJECT_STATUS_LABELS values in constants/project.ts use these keys)
status: {
planning: '📐 Planning',
in_progress: '💻 In Progress',
paused: '⏸ Paused',
completed: '✅ Completed',
cancelled: '❌ Cancelled',
active: '🚀 In Progress',
},
},
}

118
src/i18n/en/settings.ts Normal file
View File

@@ -0,0 +1,118 @@
export default {
settings: {
// ===== Page title =====
title: '⚙️ Settings',
// ===== AI Provider panel =====
panelAiProvider: '🤖 AI Model Config',
addProvider: '+ Add Provider',
editProviderTitle: 'Edit Provider',
addProviderTitle: 'Add Provider',
emptyProvider: 'No AI provider. Click above to add.',
badgeDefault: 'Default',
actionSetDefault: 'Set as default',
detailBaseUrl: 'Base URL',
detailModel: 'Model',
detailApiKey: 'API Key',
// Provider form
labelName: 'Name',
labelProviderType: 'Protocol',
labelBaseUrl: 'Base URL',
labelApiKey: 'API Key',
labelDefaultModel: 'Default',
phProviderName: 'e.g. DeepSeek, GLM-4',
phBaseUrl: 'https://api.deepseek.com',
phApiKey: 'sk-...',
phDefaultModel: 'deepseek-chat',
providerTypeOpenaiCompat: 'OpenAI-compatible (DeepSeek / GLM v4 / OpenAI)',
providerTypeAnthropic: 'Anthropic-compatible (GLM subscription / Claude)',
saving: 'Saving...',
// ===== Connection panel =====
panelConnection: '🔗 Connections',
addConnection: '+ Add connection',
editConnectionTitle: 'Edit connection',
addConnectionTitle: 'Add connection',
emptyConnection: 'No connection yet. Click the button above to add one.',
labelType: 'Type',
labelHost: 'Host',
labelPort: 'Port',
labelUser: 'Username',
phConnName: 'flux_dev',
phHost: '127.0.0.1',
phPort: '3306',
phUser: 'root',
// ===== General settings panel =====
panelGeneral: '🎨 General',
labelTheme: 'Theme',
descTheme: 'Dark / light',
themeDark: '🌙 Dark',
themeLight: '☀️ Light',
themeSystem: '💻 System',
labelLanguage: 'Language',
descLanguage: 'Interface language',
labelAiLanguage: 'AI language',
descAiLanguage: 'Default AI reply language',
aiLanguageAuto: '🔄 Follow interface language',
aiLanguageZh: '🇨🇳 简体中文',
aiLanguageEn: '🇺🇸 English',
labelAutoExecute: 'Auto-execute',
descAutoExecute: 'Let AI auto-execute low-risk actions',
labelLogLevel: 'Log level',
descLogLevel: 'Verbosity of workflow logs',
labelShowTokenUsage: 'Show token usage',
descShowTokenUsage: 'Show token consumption of each reply in conversations',
labelGlobalConcurrency: 'Global max concurrency',
descGlobalConcurrency: 'Shared cap on simultaneous LLM requests across all conversations',
labelPerConvConcurrency: 'Per-conversation concurrency',
descPerConvConcurrency: 'Concurrent LLM calls within one conversation (main loop / title / distill shared)',
// ===== Knowledge base panel =====
panelKnowledge: '📚 Knowledge base',
labelAutoExtract: 'Auto-distill knowledge',
descAutoExtract: 'Automatically distill reusable knowledge from conversations after they finish (AI proposes candidates, manual review required)',
labelTriggerMode: 'Distill trigger',
descTriggerMode: 'When auto-distillation is triggered',
triggerOnComplete: 'On conversation complete',
triggerOnIdle: 'On conversation idle',
triggerManualOnly: 'Manual only',
labelMinMessages: 'Min message count',
descMinMessages: 'Distillation triggers only after this many messages (filters out small talk noise)',
labelIdleTimeout: 'Idle timeout (s)',
descIdleTimeout: 'Seconds to wait in idle-trigger mode',
labelAutoInject: 'Auto-inject related knowledge',
descAutoInject: 'Retrieve related knowledge and inject it into the conversation context during chat',
labelVectorEnabled: 'Semantic retrieval (vector)',
descVectorEnabled: 'Use Embedding vectors for semantic matching — close meanings surface even with different wording; when off, pure keyword matching with zero external calls',
labelEmbeddingProvider: 'Embedding provider',
descEmbeddingProvider: 'AI provider used for vectorization (OpenAI-compatible only; switching requires re-embedding all knowledge)',
labelEmbeddingModel: 'Embedding model',
descEmbeddingModel: 'e.g. embedding-3 (Zhipu) / text-embedding-v4 (Alibaba) / text-embedding-3-small (OpenAI)',
embeddingProviderNone: 'Not selected',
phEmbeddingModel: 'embedding-3',
// ===== Toast =====
toastLoadProviderFail: 'Failed to load providers',
toastSaveIncomplete: 'Please fill in all fields (Name / Base URL / API Key / Model)',
toastSaved: 'Saved',
toastSaveFail: 'Save failed: {msg}',
toastDeleted: 'Deleted',
toastDeleteFail: 'Delete failed: {msg}',
toastSetDefaultOk: 'Set as default',
toastSetDefaultFail: 'Failed to set default: {msg}',
toastConnIncomplete: 'Please fill in Name and Host',
// ===== Confirm dialogs =====
confirmDeleteProvider: 'Delete provider "{name}"? This cannot be undone.',
confirmDeleteConn: 'Delete connection "{name}"?',
},
}

56
src/i18n/en/tasks.ts Normal file
View File

@@ -0,0 +1,56 @@
export default {
tasks: {
// Header
title: '🔀 Task Queue',
refresh: '🔄 Refresh',
create: '+ New Task',
// Filter bar
filter: {
project: 'Project: ',
status: 'Status: ',
all: 'All',
},
// Status filters (with icons)
statusFilter: {
all: 'All',
todo: 'Todo',
in_progress: 'In Progress',
review_ready: 'Review Ready',
merged: 'Merged',
abandoned: 'Abandoned',
},
// Groups
group: {
taskCount: '{n} tasks',
unknownProject: 'Unknown Project',
},
// New task modal
modal: {
title: 'New Task',
project: 'Project',
titleField: 'Title',
desc: 'Description',
branch: 'Branch',
priority: 'Priority',
titlePlaceholder: 'Enter task title...',
descPlaceholder: 'Brief description (optional)',
branchPlaceholder: 'feature/xxx (optional)',
// Priority options
priorityCritical: 'P0 Critical',
priorityHigh: 'P1 High',
priorityMedium: 'P2 Medium',
priorityLow: 'P3 Low',
},
// Status labels (TASK_STATUS_LABELS values in constants/project.ts use these keys)
status: {
todo: '📋 Todo',
in_progress: '🔄 In Progress',
review_ready: '👀 Review Ready',
merged: '✅ Merged',
abandoned: '🗑️ Abandoned',
},
},
}

View File

@@ -1,16 +1,26 @@
import { createI18n } from 'vue-i18n'
import zhCN from './zh-CN'
import en from './en'
import { useAppSettingsStore } from '../stores/appSettings'
// 界面语言:模块加载时 appSettings 缓存尚未填充(loadAll 在 App.vue onMounted 异步执行),
// 故这里 get() 拿到默认 'zh-CN';真实用户偏好由 App.vue 在 loadAll 完成后回填到
// i18n.global.locale.value,初帧渲染短暂 zh-CN 不影响功能。
const getInitialLocale = () => {
if (typeof window !== 'undefined') {
return useAppSettingsStore().get<string>('df-language', 'zh-CN')
}
return 'zh-CN'
}
// 界面语言:跟随 localStorage 中用户选择,默认简体中文
const i18n = createI18n({
legacy: false,
globalInjection: true, // 模板中可直接用 $t / $tc
locale: localStorage.getItem('df-language') || 'zh-CN',
locale: getInitialLocale(),
fallbackLocale: 'en',
messages: {
'zh-CN': zhCN,
en,
'zh-CN': zhCN as Record<string, any>,
en: en as Record<string, any>,
},
})

10
src/i18n/zh-CN/ai.ts Normal file
View File

@@ -0,0 +1,10 @@
export default {
ai: {
assistant: 'AI 助手',
toolName: {
readFile: '读取文件',
listDirectory: '查看目录',
writeFile: '写入文件',
},
},
}

64
src/i18n/zh-CN/aiChat.ts Normal file
View File

@@ -0,0 +1,64 @@
export default {
aiChat: {
// ── 对话侧栏 ──
sidebarTitle: '对话',
newConversation: '新对话',
doubleClickToRename: '双击重命名',
archive: '归档',
unarchive: '取消归档',
archived: '已归档',
archivedCount: '已归档 ({n})',
emptyConversation: '暂无对话',
// ── 时间分组(侧栏) ──
today: '今天',
yesterday: '昨天',
earlier: '更早',
// ── Header 按钮 ──
conversationList: '对话列表',
maximize: '最大化',
restoreSidebar: '还原侧栏',
detachWindow: '分离窗口',
closePanel: '关闭面板',
dockRight: '吸附到主窗口右侧',
undock: '取消吸附',
pinOnTop: '置顶',
unpin: '取消置顶',
closeWindow: '关闭窗口',
// ── Provider 状态 ──
clickToSwitchProvider: '点击切换 Provider',
providerNotConfigured: '未配置 AI 提供商,请在设置中添加',
notConfigured: '未配置',
// ── 空状态 ──
emptyNoProvider: '未配置 AI 提供商',
emptyNoProviderHint: '请在设置中添加 Provider 后开始对话',
emptyTitle: '与 AI 助手对话',
emptyHint: '可以说"帮我创建一个项目"或"列出所有任务"',
// ── 回到底部 ──
backToBottom: '回到底部',
// ── 待发送队列 ──
queueTitle: '待发送 {n}/10',
clearQueue: '清空',
// ── 技能 ──
clearSkill: '取消技能',
placeholderWithSkill: '已选技能,输入参数后回车',
placeholderDefault: '输入消息.../ 触发技能)',
skillNoMatch: '无匹配技能',
skillNotLoaded: '未读取到本机技能',
// ── 发送 ──
stopGenerating: '停止生成',
// ── 输入提示 ──
inputHint: 'Enter 发送 · Shift+Enter 换行',
// ── 确认弹层 ──
confirmDeleteConversation: '确定删除对话「{title}」?该操作不可恢复。',
},
}

33
src/i18n/zh-CN/aiTool.ts Normal file
View File

@@ -0,0 +1,33 @@
export default {
aiTool: {
running: '执行中…',
approve: '批准执行',
reject: '拒绝',
rejectedHint: '用户拒绝了此操作',
collapse: '收起',
expandAll: '展开全部',
written: '已写入',
items: '项',
lines: '行',
// 工具显示名(含路径摘要前缀,fallback 兜底)
readPrefix: '读取',
readFallback: '读取文件',
dirPrefix: '目录',
dirFallback: '列出目录',
writePrefix: '写入',
writeFallback: '写入文件',
// completed 结果摘要(header 折叠态可见)
taskCount: '{n} 项任务',
projectCount: '{n} 个项目',
ideaCount: '{n} 条想法',
createdWithName: '已创建:{name}',
created: '已创建',
updatedField: '已更新 {field}',
updated: '已更新',
deleted: '已删除',
deleteIneffective: '删除未生效',
workflowHint: '请到工作流页面运行',
},
}

17
src/i18n/zh-CN/common.ts Normal file
View File

@@ -0,0 +1,17 @@
export default {
common: {
justNow: '刚刚',
minutesAgo: '{n} 分钟前',
hoursAgo: '{n} 小时前',
dayAgo: '{n} 天前',
yesterday: '昨天',
ago: '{time}前',
cancel: '取消',
confirm: '确定',
delete: '删除',
save: '保存',
edit: '编辑',
close: '关闭',
loading: '加载中…',
},
}

View File

@@ -1,17 +1,4 @@
export default {
nav: {
overview: '总览',
ideas: '灵感',
projects: '项目',
tasks: '任务',
knowledge: '知识库',
decisions: '决策',
settings: '设置',
workspace: '工作区',
traceability: '追溯',
systemReady: '系统就绪',
aiPanel: 'AI 面板',
},
dashboard: {
title: '总览',
subtitle: '所有系统运行正常',
@@ -59,20 +46,4 @@ export default {
rejected: '已驳回',
},
},
ai: {
assistant: 'AI 助手',
toolName: {
readFile: '读取文件',
listDirectory: '查看目录',
writeFile: '写入文件',
},
},
common: {
justNow: '刚刚',
minutesAgo: '{n} 分钟前',
hoursAgo: '{n} 小时前',
dayAgo: '{n} 天前',
yesterday: '昨天',
ago: '{time}前',
},
}

79
src/i18n/zh-CN/ideas.ts Normal file
View File

@@ -0,0 +1,79 @@
export default {
ideas: {
// 页头
title: '💡 灵感',
refresh: '🔄 刷新',
capture: '✨ 捕捉灵感',
// 筛选栏
searchPlaceholder: '搜索灵感...',
filter: {
all: '全部',
hot: '热门',
pending: '待评估',
promoted: '已立项',
},
// 空状态
emptyState: '选择一个想法查看详情',
// 对抗式评估
adversarialTitle: '⚖️ 对抗式评估',
evalModeHeuristic: '启发式',
positive: '📈 正方观点',
negative: '📉 反方观点',
confidence: '{n}% 置信度',
analystTitle: '🧠 AI 分析师结论',
finalScore: '综合评分: {score}/10',
netSentiment: '整体倾向: {tone} ({n})',
sentimentPositive: '积极',
sentimentNegative: '谨慎',
actionTitle: '💡 行动建议',
evaluating: '⏳ 评估中…',
startEval: '🔍 开始对抗评估',
// 评估结论徽章
assessment: {
'immediate action': '🚀 立即行动',
soon: '📅 尽快行动',
'with resources': '📦 配置资源后行动',
'research more': '🔍 需要更多研究',
monitor: '👁️ 持续监控',
cancel: '❌ 取消想法',
},
// 多维评分
multiScoreTitle: '📊 多维评分',
noEval: '暂无评估',
// 标签
tagsTitle: '🏷️ 标签',
noTags: '暂无标签',
// 状态管理
statusTitle: '📋 状态管理',
status: {
draft: '📝 草稿',
pending_review: '⏳ 待评估',
approved: '✅ 已批准',
promoted: '🚀 已立项',
rejected: '❌ 已拒绝',
},
// 操作按钮
promoteToProject: '🚀 立项为项目',
deleteIdea: '🗑️ 删除想法',
// 捕捉模态框
captureTitle: '✨ 捕捉新想法',
fieldTitle: '标题',
fieldDesc: '描述',
titlePlaceholder: '一句话描述你的想法...',
descPlaceholder: '详细说明(可选)...',
// 原生对话框文案confirm / alert
confirmDelete: '确定删除想法「{title}」?此操作不可撤销。',
promoteFailed: '立项失败',
evalFailed: '评估失败',
},
}

14
src/i18n/zh-CN/index.ts Normal file
View File

@@ -0,0 +1,14 @@
// 自动聚合本目录所有模块文件 —— 新增模块文件即生效,无需改此文件。
// 排除 index 自身。每个模块文件 export default 一个对象,顶层 key 合并进 messages。
const modules = import.meta.glob(['./*.ts'], { eager: true, import: 'default' }) as Record<
string,
Record<string, unknown>
>
const messages: Record<string, unknown> = {}
for (const [path, mod] of Object.entries(modules)) {
if (path.endsWith('index.ts')) continue
Object.assign(messages, mod)
}
export default messages

View File

@@ -0,0 +1,94 @@
export default {
knowledge: {
title: '📚 知识库',
add: '+ 新增知识',
// 顶层 Tab
tab: {
library: '知识库',
inbox: '审核收件箱',
},
// 搜索
searchPlaceholder: '搜索标题、标签、内容...',
// 分类
categoryAll: '全部',
// 列表空状态
emptyInbox: '✅ 暂无待审核条目',
emptyLibrary: '📭 没有匹配的知识',
// 详情头部操作
edit: '✏️ 编辑',
publish: '发布',
reject: '拒绝',
archive: '归档',
// 详情徽章
reuseCount: '🔄 复用 {n} 次',
confidenceBadge: '置信度: {label}',
// 详情字段
contentLabel: '内容',
tagsLabel: '标签',
tagsNone: '无',
tagsPlaceholder: '逗号分隔',
// 溯源
traceTitle: '🔍 溯源',
traceMethod: '产生方式',
traceSource: '来源对话',
traceTime: '产生时间',
originExtracted: '🤖 AI 从对话中提炼',
originManual: '✍️ 手动录入',
originUnknown: '—',
reasoningLabel: '🤖 AI 判断依据',
// 引用
refTitle: '🔄 引用记录({n} 次)',
refEmpty: '尚未被引用',
loadMore: '加载更多(剩 {n} 条)',
// 生命周期
lifecycleTitle: '📅 生命周期',
// 详情空状态
detailEmptyHint: '选择左侧知识查看完整生命线',
// 新增对话框
createTitle: '新增知识',
kindLabel: '类型',
titleLabel: '标题',
titlePlaceholder: '简短标题',
contentPlaceholder: '完整可复用内容',
tagsFieldLabel: '标签(逗号分隔)',
tagsFieldPlaceholder: 'Go, 并发, context',
confidenceLabel: '置信度',
confidenceNone: '不设置',
create: '创建',
// 时间线节点
timeline: {
extracted: 'AI 提炼产生',
created: '手动录入',
published: '审核通过',
archived: '归档',
enterReview: '进入审核',
referenced: '被引用',
statusChanged: '状态 → {to}',
summarySource: '来源: {title}',
summaryConv: '对话: {title}',
},
// 状态标签
status: {
candidate: '待审核',
pending_review: '审核中',
published: '已发布',
archived: '已归档',
},
// 置信度标签
confidence: {
high: '高',
medium: '中',
low: '低',
},
// 知识类型(与 store KNOWLEDGE_KINDS key 对齐)
kind: {
review_rule: '审查规则',
prompt_template: 'Prompt模板',
pitfall: '踩坑经验',
architecture_pattern: '架构模式',
diagnosis: '诊断知识',
deployment_note: '部署经验',
workflow_optimization: '工作流优化',
},
},
}

15
src/i18n/zh-CN/nav.ts Normal file
View File

@@ -0,0 +1,15 @@
export default {
nav: {
overview: '总览',
ideas: '灵感',
projects: '项目',
tasks: '任务',
knowledge: '知识库',
decisions: '决策',
settings: '设置',
workspace: '工作区',
traceability: '追溯',
systemReady: '系统就绪',
aiPanel: 'AI 面板',
},
}

View File

@@ -0,0 +1,54 @@
export default {
projectDetail: {
// 头部
backToList: '← 项目列表',
sync: '🔄 同步',
delete: '🗑 删除',
newTask: '+ 新任务',
// 阶段 pipeline
stageIdea: '💡 想法',
stageRequirement: '📋 需求',
stageCoding: '💻 编码',
stageTesting: '🧪 测试',
stageRelease: '🚀 发布',
// 新建任务模态框
newTaskTitle: '新建任务',
taskTitleLabel: '任务标题',
taskTitlePlaceholder: '输入任务标题',
descLabel: '描述',
descPlaceholder: '简要描述',
branchLabel: '分支名称',
confirmCreate: '确认创建',
// 项目信息面板
infoTitle: '📋 项目信息',
sourceIdea: '来源想法',
viewIdea: '查看想法详情',
ideaDeleted: '原始想法已删除',
createdAt: '创建时间',
updatedAt: '更新时间',
description: '描述',
projectStatus: '项目状态',
// 任务列表面板
taskListTitle: '🔀 任务列表',
taskCount: '{n} 个任务',
emptyTasks: '暂无任务',
// 工作流日志面板
workflowLogTitle: '📋 工作流日志',
runDemoWorkflow: '▶ 运行测试工作流',
emptyWorkflowLog: '点击"运行测试工作流"查看实时日志',
// 审批对话框
approvalTitle: '需要人工审批',
approvalHint: '请选择操作:',
approvalLater: '稍后处理',
// 删除确认
confirmDelete: '确定删除项目「{name}」?将移入回收站,可恢复。',
// 项目目录
codeDirLabel: '代码目录',
noDirBound: '未绑定',
relocateDir: '重定位',
bindDir: '绑定目录',
dirStatusLabel: '目录状态',
// 技术栈
techStackLabel: '技术栈',
},
}

View File

@@ -0,0 +1,41 @@
export default {
projects: {
title: '📂 项目列表',
// 头部操作
create: '+ 新建项目',
trash: '🗑 回收站',
// 新建项目模态框
createTitle: '新建项目',
nameLabel: '项目名称',
namePlaceholder: '输入项目名称',
descLabel: '项目描述',
descPlaceholder: '简要描述项目目标',
codeDirLabel: '代码目录',
codeDirPlaceholder: '点击右侧选择项目所在目录',
selectDir: '选择目录',
clearDir: '清除',
confirmCreate: '确认创建',
// 回收站模态框
trashTitle: '🗑 回收站',
trashEmpty: '回收站为空',
movedIn: '移入',
restore: '↩ 恢复',
purge: '彻底删除',
// 项目卡片
deleteTitle: '删除',
// 空状态
empty: '暂无项目,点击右上角创建第一个项目',
// 确认文案
confirmDelete: '确定删除项目「{name}」?将移入回收站,可恢复。',
confirmPurge: '彻底删除项目「{name}」?连带任务/分支/发布一并物理删除,不可恢复!',
// 状态文案(constants/project.ts 的 PROJECT_STATUS_LABELS 值走此 key)
status: {
planning: '📐 规划中',
in_progress: '💻 进行中',
paused: '⏸ 已暂停',
completed: '✅ 已完成',
cancelled: '❌ 已取消',
active: '🚀 进行中',
},
},
}

118
src/i18n/zh-CN/settings.ts Normal file
View File

@@ -0,0 +1,118 @@
export default {
settings: {
// ===== 页面标题 =====
title: '⚙️ 设置',
// ===== AI 模型配置面板 =====
panelAiProvider: '🤖 AI 模型配置',
addProvider: '+ 添加 Provider',
editProviderTitle: '编辑 Provider',
addProviderTitle: '添加 Provider',
emptyProvider: '暂无 AI 提供商,点击上方按钮添加',
badgeDefault: '默认',
actionSetDefault: '设为默认',
detailBaseUrl: 'Base URL',
detailModel: '模型',
detailApiKey: 'API Key',
// Provider 表单
labelName: '名称',
labelProviderType: '协议类型',
labelBaseUrl: 'Base URL',
labelApiKey: 'API Key',
labelDefaultModel: '默认模型',
phProviderName: '如 DeepSeek、GLM-4',
phBaseUrl: 'https://api.deepseek.com',
phApiKey: 'sk-...',
phDefaultModel: 'deepseek-chat',
providerTypeOpenaiCompat: 'OpenAI 兼容DeepSeek / GLM v4 / OpenAI',
providerTypeAnthropic: 'Anthropic 兼容GLM 订阅 / Claude',
saving: '保存中...',
// ===== 连接管理面板 =====
panelConnection: '🔗 连接管理',
addConnection: '+ 添加连接',
editConnectionTitle: '编辑连接',
addConnectionTitle: '添加连接',
emptyConnection: '暂无连接,点击上方按钮添加',
labelType: '类型',
labelHost: 'Host',
labelPort: 'Port',
labelUser: '用户名',
phConnName: 'flux_dev',
phHost: '127.0.0.1',
phPort: '3306',
phUser: 'root',
// ===== 通用设置面板 =====
panelGeneral: '🎨 通用设置',
labelTheme: '主题',
descTheme: '深色 / 浅色模式',
themeDark: '🌙 深色模式',
themeLight: '☀️ 浅色模式',
themeSystem: '💻 跟随系统',
labelLanguage: '语言',
descLanguage: '界面显示语言',
labelAiLanguage: 'AI 对话语言',
descAiLanguage: 'AI 回复使用的默认语言',
aiLanguageAuto: '🔄 跟随界面语言',
aiLanguageZh: '🇨🇳 简体中文',
aiLanguageEn: '🇺🇸 English',
labelAutoExecute: 'AI 自动执行',
descAutoExecute: 'AI 可自动执行低风险操作',
labelLogLevel: '日志级别',
descLogLevel: '工作流日志详细程度',
labelShowTokenUsage: '显示 Token 用量',
descShowTokenUsage: '在对话中展示每次回复的 token 消耗',
labelGlobalConcurrency: '全局最大并发',
descGlobalConcurrency: '所有对话共享的 LLM 同时请求数上限',
labelPerConvConcurrency: '单对话并发上限',
descPerConvConcurrency: '单个对话内同时进行的 LLM 调用数(主循环 / 标题 / 提炼共享)',
// ===== 知识库面板 =====
panelKnowledge: '📚 知识库',
labelAutoExtract: '自动提炼知识',
descAutoExtract: '对话完成后自动从内容中提炼可复用知识(AI 提炼产候选,需人工审核)',
labelTriggerMode: '提炼触发方式',
descTriggerMode: '自动提炼的触发时机',
triggerOnComplete: '对话完成后',
triggerOnIdle: '对话闲置后',
triggerManualOnly: '仅手动',
labelMinMessages: '最少消息数',
descMinMessages: '对话达到此消息数才触发提炼(防闲聊噪音)',
labelIdleTimeout: '闲置超时(秒)',
descIdleTimeout: '闲置触发模式下等待的秒数',
labelAutoInject: '自动注入相关知识',
descAutoInject: '聊天时自动检索相关知识注入对话上下文',
labelVectorEnabled: '语义检索(向量)',
descVectorEnabled: '用 Embedding 向量做语义匹配,意思相近用词不同也能搜到;关闭时纯关键词匹配,零外部调用',
labelEmbeddingProvider: 'Embedding Provider',
descEmbeddingProvider: '向量化用的 AI 提供商(仅 OpenAI 兼容类型;选定后更换需重新嵌入全部知识)',
labelEmbeddingModel: 'Embedding 模型',
descEmbeddingModel: '如 embedding-3(智谱) / text-embedding-v4(阿里) / text-embedding-3-small(OpenAI)',
embeddingProviderNone: '未选择',
phEmbeddingModel: 'embedding-3',
// ===== Toast 提示 =====
toastLoadProviderFail: '加载提供商失败',
toastSaveIncomplete: '请填写完整(名称 / Base URL / API Key / 模型)',
toastSaved: '已保存',
toastSaveFail: '保存失败:{msg}',
toastDeleted: '已删除',
toastDeleteFail: '删除失败:{msg}',
toastSetDefaultOk: '已设为默认',
toastSetDefaultFail: '设置默认失败:{msg}',
toastConnIncomplete: '请填写名称和 Host',
// ===== 确认弹层 =====
confirmDeleteProvider: '确定删除提供商「{name}」?该操作不可恢复。',
confirmDeleteConn: '确定删除连接「{name}」?',
},
}

56
src/i18n/zh-CN/tasks.ts Normal file
View File

@@ -0,0 +1,56 @@
export default {
tasks: {
// 页头
title: '🔀 任务队列',
refresh: '🔄 刷新',
create: '+ 新建任务',
// 筛选栏
filter: {
project: '项目:',
status: '状态:',
all: '全部',
},
// 状态筛选(含图标)
statusFilter: {
all: '全部',
todo: '待开始',
in_progress: '进行中',
review_ready: '待审查',
merged: '已合并',
abandoned: '已放弃',
},
// 分组
group: {
taskCount: '{n} 个任务',
unknownProject: '未知项目',
},
// 新建任务模态
modal: {
title: '新建任务',
project: '项目',
titleField: '标题',
desc: '描述',
branch: '分支',
priority: '优先级',
titlePlaceholder: '输入任务标题...',
descPlaceholder: '简要描述(可选)',
branchPlaceholder: 'feature/xxx(可选)',
// 优先级选项
priorityCritical: 'P0 紧急',
priorityHigh: 'P1 高',
priorityMedium: 'P2 中',
priorityLow: 'P3 低',
},
// 状态文案(constants/project.ts 的 TASK_STATUS_LABELS 值走此 key)
status: {
todo: '📋 待开始',
in_progress: '🔄 进行中',
review_ready: '👀 待审查',
merged: '✅ 已合并',
abandoned: '🗑️ 已放弃',
},
},
}