新增: 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:
lxy
2026-06-14 14:08:20 +08:00
parent 98393b4908
commit cf017f81e2
167 changed files with 19549 additions and 6886 deletions
+10
View File
@@ -0,0 +1,10 @@
export default {
ai: {
assistant: 'AI Assistant',
toolName: {
readFile: 'Read File',
listDirectory: 'List Directory',
writeFile: 'Write File',
},
},
}
+64
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
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
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…',
},
}
+49
View File
@@ -0,0 +1,49 @@
export default {
dashboard: {
title: 'Overview',
subtitle: 'All systems operational',
refresh: 'Refresh',
captureIdea: 'Capture Idea',
stats: {
ideas: 'Ideas',
projects: 'Projects',
activeTasks: 'Active Tasks',
drafts: 'Drafts',
annotations: 'Annotations',
},
activeProjects: 'Active Projects',
viewAll: 'View all',
ideaPool: 'Idea Pool',
recentDecisions: 'Recent Decisions',
openAnnotations: 'Open Annotations',
aiBatchProcess: 'AI Batch Process',
tasks: '{count} tasks',
taskUnit: '{n} tasks',
trending: 'Trending',
approved: 'Approved',
pending: 'Pending',
reviewing: 'Reviewing',
coding: 'Coding',
testing: 'Testing',
release: 'Release',
empty: {
noProjects: 'No projects yet',
noIdeas: 'No ideas yet, click above to capture',
noData: 'No data',
},
stage: {
planning: 'Planning',
coding: 'Coding',
paused: 'Paused',
done: 'Done',
cancelled: 'Cancelled',
},
ideaStatus: {
draft: 'Draft',
pending_review: 'Pending',
approved: 'Approved',
promoted: 'Promoted',
rejected: 'Rejected',
},
},
}
+79
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
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
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
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',
},
}
+54
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
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
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
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',
},
},
}