@geminilight/mindos 0.6.28 → 0.6.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/README.md +10 -4
  2. package/app/app/api/a2a/agents/route.ts +9 -0
  3. package/app/app/api/a2a/delegations/route.ts +9 -0
  4. package/app/app/api/a2a/discover/route.ts +2 -0
  5. package/app/app/api/a2a/route.ts +6 -6
  6. package/app/app/api/acp/config/route.ts +82 -0
  7. package/app/app/api/acp/detect/route.ts +114 -0
  8. package/app/app/api/acp/install/route.ts +51 -0
  9. package/app/app/api/acp/registry/route.ts +31 -0
  10. package/app/app/api/acp/session/route.ts +185 -0
  11. package/app/app/api/ask/route.ts +116 -13
  12. package/app/app/api/workflows/route.ts +156 -0
  13. package/app/app/layout.tsx +2 -0
  14. package/app/app/page.tsx +7 -2
  15. package/app/components/ActivityBar.tsx +12 -4
  16. package/app/components/AskModal.tsx +4 -1
  17. package/app/components/DirView.tsx +64 -2
  18. package/app/components/FileTree.tsx +40 -10
  19. package/app/components/GuideCard.tsx +7 -17
  20. package/app/components/HomeContent.tsx +1 -0
  21. package/app/components/MarkdownView.tsx +2 -0
  22. package/app/components/Panel.tsx +1 -0
  23. package/app/components/RightAskPanel.tsx +5 -1
  24. package/app/components/SearchModal.tsx +234 -80
  25. package/app/components/SidebarLayout.tsx +6 -0
  26. package/app/components/agents/AgentDetailContent.tsx +266 -52
  27. package/app/components/agents/AgentsContentPage.tsx +32 -6
  28. package/app/components/agents/AgentsPanelA2aTab.tsx +684 -0
  29. package/app/components/agents/AgentsPanelSessionsTab.tsx +166 -0
  30. package/app/components/agents/SkillDetailPopover.tsx +4 -9
  31. package/app/components/agents/agents-content-model.ts +2 -2
  32. package/app/components/ask/AgentSelectorCapsule.tsx +218 -0
  33. package/app/components/ask/AskContent.tsx +197 -239
  34. package/app/components/ask/FileChip.tsx +82 -17
  35. package/app/components/ask/MentionPopover.tsx +21 -3
  36. package/app/components/ask/MessageList.tsx +30 -9
  37. package/app/components/ask/SlashCommandPopover.tsx +21 -3
  38. package/app/components/help/HelpContent.tsx +9 -9
  39. package/app/components/panels/AgentsPanel.tsx +2 -0
  40. package/app/components/panels/AgentsPanelAgentDetail.tsx +5 -8
  41. package/app/components/panels/AgentsPanelHubNav.tsx +16 -2
  42. package/app/components/panels/EchoPanel.tsx +5 -1
  43. package/app/components/panels/EchoSidebarStats.tsx +136 -0
  44. package/app/components/panels/WorkflowsPanel.tsx +206 -0
  45. package/app/components/renderers/workflow-yaml/StepEditor.tsx +157 -0
  46. package/app/components/renderers/workflow-yaml/WorkflowEditor.tsx +201 -0
  47. package/app/components/renderers/workflow-yaml/WorkflowRunner.tsx +226 -0
  48. package/app/components/renderers/workflow-yaml/WorkflowYamlRenderer.tsx +126 -0
  49. package/app/components/renderers/workflow-yaml/execution.ts +177 -0
  50. package/app/components/renderers/workflow-yaml/index.ts +6 -0
  51. package/app/components/renderers/workflow-yaml/manifest.ts +21 -0
  52. package/app/components/renderers/workflow-yaml/parser.ts +172 -0
  53. package/app/components/renderers/workflow-yaml/selectors.tsx +522 -0
  54. package/app/components/renderers/workflow-yaml/serializer.ts +56 -0
  55. package/app/components/renderers/workflow-yaml/types.ts +46 -0
  56. package/app/components/settings/KnowledgeTab.tsx +3 -6
  57. package/app/components/settings/McpSkillsSection.tsx +4 -5
  58. package/app/components/settings/McpTab.tsx +6 -8
  59. package/app/components/setup/StepSecurity.tsx +4 -5
  60. package/app/components/setup/index.tsx +5 -11
  61. package/app/components/ui/Toaster.tsx +39 -0
  62. package/app/hooks/useA2aRegistry.ts +6 -1
  63. package/app/hooks/useAcpConfig.ts +96 -0
  64. package/app/hooks/useAcpDetection.ts +120 -0
  65. package/app/hooks/useAcpRegistry.ts +86 -0
  66. package/app/hooks/useAskModal.ts +12 -5
  67. package/app/hooks/useAskPanel.ts +8 -5
  68. package/app/hooks/useAskSession.ts +19 -2
  69. package/app/hooks/useDelegationHistory.ts +49 -0
  70. package/app/hooks/useImageUpload.ts +152 -0
  71. package/app/lib/a2a/client.ts +49 -5
  72. package/app/lib/a2a/orchestrator.ts +0 -1
  73. package/app/lib/a2a/task-handler.ts +4 -4
  74. package/app/lib/a2a/types.ts +15 -0
  75. package/app/lib/acp/acp-tools.ts +95 -0
  76. package/app/lib/acp/agent-descriptors.ts +274 -0
  77. package/app/lib/acp/bridge.ts +144 -0
  78. package/app/lib/acp/index.ts +40 -0
  79. package/app/lib/acp/registry.ts +202 -0
  80. package/app/lib/acp/session.ts +717 -0
  81. package/app/lib/acp/subprocess.ts +495 -0
  82. package/app/lib/acp/types.ts +274 -0
  83. package/app/lib/agent/model.ts +18 -3
  84. package/app/lib/agent/to-agent-messages.ts +25 -2
  85. package/app/lib/agent/tools.ts +2 -1
  86. package/app/lib/i18n/_core.ts +22 -0
  87. package/app/lib/i18n/index.ts +35 -0
  88. package/app/lib/i18n/modules/ai-chat.ts +215 -0
  89. package/app/lib/i18n/modules/common.ts +71 -0
  90. package/app/lib/i18n/modules/features.ts +153 -0
  91. package/app/lib/i18n/modules/knowledge.ts +429 -0
  92. package/app/lib/i18n/modules/navigation.ts +153 -0
  93. package/app/lib/i18n/modules/onboarding.ts +523 -0
  94. package/app/lib/i18n/modules/panels.ts +1196 -0
  95. package/app/lib/i18n/modules/settings.ts +585 -0
  96. package/app/lib/i18n-en.ts +2 -1518
  97. package/app/lib/i18n-zh.ts +2 -1542
  98. package/app/lib/i18n.ts +3 -6
  99. package/app/lib/pi-integration/skills.ts +21 -6
  100. package/app/lib/renderers/index.ts +2 -2
  101. package/app/lib/settings.ts +10 -0
  102. package/app/lib/toast.ts +79 -0
  103. package/app/lib/types.ts +12 -1
  104. package/app/next-env.d.ts +1 -1
  105. package/app/package.json +3 -1
  106. package/bin/cli.js +25 -25
  107. package/bin/commands/file.js +29 -2
  108. package/bin/commands/space.js +249 -91
  109. package/package.json +1 -1
  110. package/templates/en/.mindos/workflows/Sprint Release.flow.yaml +130 -0
  111. package/templates/zh/.mindos/workflows//345/221/250/350/277/255/344/273/243/346/243/200/346/237/245.flow.yaml +84 -0
  112. package/app/components/renderers/workflow/WorkflowRenderer.tsx +0 -409
  113. package/app/components/renderers/workflow/manifest.ts +0 -14
@@ -0,0 +1,71 @@
1
+ // common + app + login + notFound + updateBanner
2
+
3
+ export const commonEn = {
4
+ common: {
5
+ relatedFiles: 'Related Files',
6
+ },
7
+ app: {
8
+ tagline: 'You think here, Agents act there.',
9
+ footer: 'MindOS · human-agent collaborative mind system',
10
+ },
11
+ login: {
12
+ tagline: 'You think here, Agents act there.',
13
+ subtitle: 'Enter your password to continue',
14
+ passwordLabel: 'Password',
15
+ passwordPlaceholder: 'Enter password',
16
+ signIn: 'Sign in',
17
+ signingIn: 'Signing in…',
18
+ incorrectPassword: 'Incorrect password. Please try again.',
19
+ connectionError: 'Connection error. Please try again.',
20
+ },
21
+ notFound: {
22
+ title: 'File not found',
23
+ description: 'This file does not exist in your knowledge base.',
24
+ createButton: 'Create this file',
25
+ creating: 'Creating...',
26
+ goToParent: 'Go to parent folder',
27
+ goHome: 'Home',
28
+ },
29
+ updateBanner: {
30
+ newVersion: (latest: string, current: string) => `MindOS v${latest} available (current: v${current})`,
31
+ updateNow: 'Update',
32
+ runUpdate: 'Run',
33
+ orSee: 'or',
34
+ releaseNotes: 'release notes',
35
+ },
36
+ } as const;
37
+
38
+ export const commonZh = {
39
+ common: {
40
+ relatedFiles: '关联视图',
41
+ },
42
+ app: {
43
+ tagline: '你在此思考,Agent 依此行动。',
44
+ footer: 'MindOS · 人机共生知识系统',
45
+ },
46
+ login: {
47
+ tagline: '人类在此思考,Agent 依此行动。',
48
+ subtitle: '请输入密码以继续',
49
+ passwordLabel: '密码',
50
+ passwordPlaceholder: '输入密码',
51
+ signIn: '登录',
52
+ signingIn: '登录中…',
53
+ incorrectPassword: '密码错误,请重试。',
54
+ connectionError: '连接错误,请重试。',
55
+ },
56
+ notFound: {
57
+ title: '文件未找到',
58
+ description: '该文件不存在于你的知识库中。',
59
+ createButton: '创建此文件',
60
+ creating: '创建中...',
61
+ goToParent: '返回上级目录',
62
+ goHome: '首页',
63
+ },
64
+ updateBanner: {
65
+ newVersion: (latest: string, current: string) => `MindOS v${latest} 可用(当前 v${current})`,
66
+ updateNow: '更新',
67
+ runUpdate: '终端运行',
68
+ orSee: '或',
69
+ releaseNotes: '查看更新说明',
70
+ },
71
+ };
@@ -0,0 +1,153 @@
1
+ // shortcuts + help
2
+
3
+ export const featuresEn = {
4
+ shortcuts: [
5
+ { keys: ['⌘', 'K'], description: 'Search' },
6
+ { keys: ['⌘', '/'], description: 'MindOS Agent' },
7
+ { keys: ['⌘', ','], description: 'Settings' },
8
+ { keys: ['E'], description: 'Edit current file' },
9
+ { keys: ['⌘', 'S'], description: 'Save' },
10
+ { keys: ['Esc'], description: 'Cancel edit / close modal' },
11
+ { keys: ['@'], description: 'Attach file in MindOS Agent' },
12
+ ],
13
+ help: {
14
+ title: 'Help & Guide',
15
+ subtitle: 'Everything you need to get started with MindOS',
16
+ whatIs: {
17
+ title: 'What is MindOS?',
18
+ body: 'MindOS is where you think, and where your AI agents act. You and AI share the same brain — when you correct AI, that correction is captured automatically; next time AI understands you better, and your own thinking gets sharper along the way. You and AI grow together. In an age of AI anxiety, MindOS focuses on human growth — think clearly, make better decisions, ship faster, and build up knowledge that\'s truly yours.',
19
+ },
20
+ quickStart: {
21
+ title: 'Quick Start',
22
+ step1Title: 'Browse your knowledge base',
23
+ step1Desc: 'Click the Spaces icon in the left sidebar to explore your files. Each top-level folder is a "Space" — a themed area like Profile, Notes, or Projects.',
24
+ step2Title: 'Chat with AI',
25
+ step2Desc: 'Press ⌘/ (or Ctrl/) to open the AI panel. Ask anything about your knowledge base, or use @ to attach a specific file for context.',
26
+ step3Title: 'Connect your AI agents',
27
+ step3Desc: 'Go to Settings → MCP to connect external agents like Claude Code, Cursor, or Windsurf. Once connected, they can read and write your knowledge base directly.',
28
+ },
29
+ concepts: {
30
+ title: 'Core Concepts',
31
+ spaceTitle: 'Space',
32
+ spaceDesc: 'Spaces are knowledge partitions organized the way you think. You decide the structure, and AI agents follow it to read, write, and manage automatically.',
33
+ instructionTitle: 'Instruction',
34
+ instructionDesc: 'A rules file that all AI agents obey. You write the boundaries once, and every agent connected to your knowledge base follows them.',
35
+ skillTitle: 'Skill',
36
+ skillDesc: 'Teaches agents how to operate your knowledge base — reading, writing, organizing. Agents don\'t guess; they follow the skills you\'ve installed.',
37
+ },
38
+ shortcutsTitle: 'Keyboard Shortcuts',
39
+ agentUsage: {
40
+ title: 'Using MindOS with AI Agents',
41
+ intro: 'Once you connect an agent (Claude Code, Cursor, Windsurf, etc.) via MCP, just talk to it naturally. The agent can read and write your knowledge base directly — no special commands needed. Here are the most common scenarios:',
42
+ scenarios: [
43
+ { emoji: '🪪', title: 'Inject Your Identity', desc: 'Tell all AI agents who you are — preferences, tech stack, communication style — in one shot.', prompt: "\"Here's my resume, read it and organize my info into MindOS.\"" },
44
+ { emoji: '🔄', title: 'Cross-Agent Handoff', desc: 'Brainstorm ideas in GPT, then execute in Claude Code — zero context loss.', prompt: '"Save this conversation to MindOS."\n"Read the plan in MindOS and help me start coding."' },
45
+ { emoji: '📋', title: 'Experience → SOP', desc: 'Turn hard-won debugging sessions into reusable workflows that prevent future mistakes.', prompt: '"Help me distill this conversation into a reusable workflow in MindOS."' },
46
+ { emoji: '🚀', title: 'Project Cold Start', desc: 'Spin up a new project in minutes — your profile and SOPs guide the scaffolding automatically.', prompt: '"Help me start a new project following the Startup SOP in MindOS."' },
47
+ { emoji: '🔍', title: 'Research & Archive', desc: 'Let agents research competitors or topics for you, then file structured results in your knowledge base.', prompt: '"Help me research X, Y, Z products and save results to the MindOS product library."' },
48
+ ],
49
+ copy: 'Copy prompt',
50
+ hint: 'Tip: The agent auto-discovers your knowledge base structure. Just mention "MindOS" in your prompt and it will know where to look. Click "Explore" in the left sidebar for more scenarios.',
51
+ },
52
+ shortcuts: {
53
+ search: 'Search files',
54
+ askAI: 'Toggle AI panel',
55
+ settings: 'Open Settings',
56
+ shortcutPanel: 'Keyboard shortcuts panel',
57
+ editFile: 'Edit current file',
58
+ save: 'Save file',
59
+ closePanel: 'Close panel / Exit modal',
60
+ attachFile: 'Attach file in AI chat',
61
+ },
62
+ faq: {
63
+ title: 'FAQ',
64
+ items: [
65
+ { q: 'How do I change the language?', a: 'Go to Settings → Appearance → Language. You can switch between English and Chinese.' },
66
+ { q: 'How do I connect an AI agent?', a: 'Go to Settings → MCP & Skills. MindOS auto-detects installed agents (Claude Code, Cursor, etc.) and lets you connect them with one click.' },
67
+ { q: 'Where is my data stored?', a: 'All your data stays on your local machine as plain Markdown files. MindOS never uploads your data to any cloud service. You own everything.' },
68
+ { q: 'How do I sync across devices?', a: 'Go to Settings → Sync. MindOS uses Git for cross-device sync. Enter your Git remote URL and access token to start syncing.' },
69
+ { q: 'Can I use my own AI provider?', a: 'Yes! Go to Settings → AI. You can use OpenAI, Anthropic, Google, or any OpenAI-compatible API with a custom base URL.' },
70
+ { q: 'What file formats are supported?', a: 'MindOS works best with Markdown (.md) files, but also supports JSON, CSV, and plain text. Plugins extend rendering for special formats like Kanban boards or timelines.' },
71
+ { q: 'How do I create a new note?', a: 'Click the + icon next to any folder in the file tree, or ask AI to create one for you. Notes are just Markdown files — you can also create them from your file system.' },
72
+ ],
73
+ },
74
+ },
75
+
76
+ /** Disabled-state and contextual tooltip hints */
77
+ } as const;
78
+
79
+ export const featuresZh = {
80
+ shortcuts: [
81
+ { keys: ['⌘', 'K'], description: '搜索' },
82
+ { keys: ['⌘', '/'], description: 'MindOS Agent' },
83
+ { keys: ['⌘', ','], description: '设置' },
84
+ { keys: ['E'], description: '编辑当前文件' },
85
+ { keys: ['⌘', 'S'], description: '保存' },
86
+ { keys: ['Esc'], description: '取消编辑 / 关闭弹窗' },
87
+ { keys: ['@'], description: '在 AI 对话中添加附件' },
88
+ ],
89
+ help: {
90
+ title: '帮助与指南',
91
+ subtitle: '开始使用 MindOS 所需的一切',
92
+ whatIs: {
93
+ title: '什么是 MindOS?',
94
+ body: 'MindOS 是你思考的地方,也是 AI Agent 行动的起点。你和 AI 共享同一个大脑——你纠正了 AI,这个纠正自动沉淀;AI 下次更懂你,你自己的思路也跟着变清晰。人和 AI 一起成长。在 AI 焦虑蔓延的时代,MindOS 更关注人的成长——想清楚问题、做好判断、快速实践、攒下属于自己的认知。',
95
+ },
96
+ quickStart: {
97
+ title: '快速开始',
98
+ step1Title: '浏览你的知识库',
99
+ step1Desc: '点击左侧边栏的"空间"图标来浏览你的文件。每个顶级文件夹是一个"空间"——比如 Profile、Notes 或 Projects。',
100
+ step2Title: '和 AI 对话',
101
+ step2Desc: '按 ⌘/(或 Ctrl/)打开 AI 面板。询问任何关于知识库的问题,或使用 @ 附加特定文件作为上下文。',
102
+ step3Title: '连接你的 AI Agent',
103
+ step3Desc: '前往 设置 → MCP 连接外部 Agent,如 Claude Code、Cursor 或 Windsurf。连接后,它们可以直接读写你的知识库。',
104
+ },
105
+ concepts: {
106
+ title: '核心概念',
107
+ spaceTitle: '空间(Space)',
108
+ spaceDesc: '空间是按你的思维方式组织的知识分区。你怎么想,就怎么分,AI Agent 遵循同样的结构来自动读写和管理。',
109
+ instructionTitle: '指令(Instruction)',
110
+ instructionDesc: '一份所有 AI Agent 都遵守的规则文件。你写一次边界,每个连接到知识库的 Agent 都会照做。',
111
+ skillTitle: '技能(Skill)',
112
+ skillDesc: '教 Agent 如何操作你的知识库——读取、写入、整理。Agent 不是瞎猜,而是按你安装的 Skill 来执行。',
113
+ },
114
+ shortcutsTitle: '快捷键',
115
+ agentUsage: {
116
+ title: '在 AI Agent 中使用 MindOS',
117
+ intro: '通过 MCP 连接 Agent(Claude Code、Cursor、Windsurf 等)后,直接用自然语言对话即可。Agent 能自动读写你的知识库,不需要特殊指令。以下是最常见的使用场景:',
118
+ scenarios: [
119
+ { emoji: '🪪', title: '注入身份', desc: '让所有 AI Agent 一次认识你——偏好、技术栈、沟通风格。', prompt: '"这是我的简历,读一下,把我的信息整理到 MindOS 里。"' },
120
+ { emoji: '🔄', title: '跨 Agent 切换', desc: '在 GPT 里聊想法,到 Claude Code 去执行——上下文零丢失。', prompt: '"帮我把刚才的对话整理到 MindOS。"\n"读一下 MindOS 里的方案,帮我开始写代码。"' },
121
+ { emoji: '📋', title: '经验→SOP', desc: '把踩坑经验沉淀为可复用的工作流,下次 3 分钟搞定。', prompt: '"帮我把这次对话的经验沉淀到 MindOS,形成可复用的工作流。"' },
122
+ { emoji: '🚀', title: '项目冷启动', desc: '几分钟搭建新项目——Profile 和 SOP 自动引导脚手架。', prompt: '"帮我按 MindOS 里的 Startup SOP 启动一个新项目。"' },
123
+ { emoji: '🔍', title: '调研入库', desc: '让 Agent 替你调研竞品或话题,结果结构化存入知识库。', prompt: '"帮我调研 X、Y、Z 这几个产品,结果写入 MindOS 产品库。"' },
124
+ ],
125
+ copy: '复制 Prompt',
126
+ hint: '提示:Agent 会自动发现你的知识库结构。在 prompt 中提到"MindOS",它就知道去哪里找。点击左侧"探索"查看更多场景。',
127
+ },
128
+ shortcuts: {
129
+ search: '搜索文件',
130
+ askAI: '切换 AI 面板',
131
+ settings: '打开设置',
132
+ shortcutPanel: '快捷键面板',
133
+ editFile: '编辑当前文件',
134
+ save: '保存文件',
135
+ closePanel: '关闭面板 / 退出弹窗',
136
+ attachFile: '在 AI 对话中附加文件',
137
+ },
138
+ faq: {
139
+ title: '常见问题',
140
+ items: [
141
+ { q: '如何切换语言?', a: '前往 设置 → 外观 → 语言。支持中文和英文切换。' },
142
+ { q: '如何连接 AI Agent?', a: '前往 设置 → MCP & Skills。MindOS 会自动检测已安装的 Agent(Claude Code、Cursor 等),一键即可连接。' },
143
+ { q: '我的数据存储在哪里?', a: '所有数据以纯 Markdown 文件的形式存储在你的本地机器上。MindOS 不会将你的数据上传到任何云服务。数据完全由你掌控。' },
144
+ { q: '如何跨设备同步?', a: '前往 设置 → 同步。MindOS 使用 Git 进行跨设备同步。输入 Git 远程仓库 URL 和访问令牌即可开始同步。' },
145
+ { q: '可以使用自己的 AI 服务商吗?', a: '可以!前往 设置 → AI。支持 OpenAI、Anthropic、Google,或任何 OpenAI 兼容的 API(自定义 Base URL)。' },
146
+ { q: '支持哪些文件格式?', a: 'MindOS 最适合 Markdown(.md)文件,但也支持 JSON、CSV 和纯文本。插件可以扩展特殊格式的渲染,如看板或时间线。' },
147
+ { q: '如何创建新笔记?', a: '点击文件树中任意文件夹旁的 + 图标,或让 AI 帮你创建。笔记就是 Markdown 文件,你也可以直接在文件系统中创建。' },
148
+ ],
149
+ },
150
+ },
151
+
152
+ /** 禁用态和上下文提示文案 */
153
+ };
@@ -0,0 +1,429 @@
1
+ // home + fileTree + fileImport + dirView + view + findInPage + importHistory
2
+
3
+ export const knowledgeEn = {
4
+ home: {
5
+ recentlyModified: 'Recently Modified',
6
+ recentlyActive: 'Recently Active',
7
+ recentlyEdited: 'Recently Edited',
8
+ allSpaces: 'All Spaces',
9
+ spaces: 'Spaces',
10
+ nFiles: (n: number) => `${n} file${n === 1 ? '' : 's'}`,
11
+ other: 'Other',
12
+ newSpace: 'New Space',
13
+ spaceName: 'Space name',
14
+ spaceDescription: 'Description',
15
+ spaceDescPlaceholder: 'Describe the purpose of this space',
16
+ spaceNameNoSlash: 'Name cannot contain / or \\',
17
+ spaceExists: 'A space with this name already exists',
18
+ spaceCreateFailed: 'Failed to create space',
19
+ noSpacesYet: 'No spaces yet. Create one to organize your knowledge.',
20
+ spaceLocation: 'Location',
21
+ rootLevel: 'Root',
22
+ optional: 'optional',
23
+ aiInit: 'AI initialize content',
24
+ aiInitHint: 'AI will generate a description and guidelines for this space',
25
+ aiInitNoKey: 'Configure an API key in Settings → AI to enable',
26
+ aiInitGenerating: (name: string) => `Generating content for ${name}`,
27
+ aiInitReady: (name: string) => `${name} ready`,
28
+ aiInitReview: 'Review',
29
+ aiInitDiscard: 'Discard',
30
+ aiInitReverted: (name: string) => `${name} reverted to template`,
31
+ createSpace: 'Create',
32
+ cancelCreate: 'Cancel',
33
+ continueEditing: 'Continue editing',
34
+ newNote: 'New Notes',
35
+ builtinFeatures: 'Tools',
36
+ builtinActive: 'Active',
37
+ builtinInactive: 'Not active',
38
+ toolName: {
39
+ 'agent-inspector': 'Agent Inspector',
40
+ 'config-panel': 'Config Panel',
41
+ 'todo': 'TODO Board',
42
+ 'workflow-yaml': 'Workflows',
43
+ } as Record<string, string>,
44
+ toolDesc: {
45
+ 'agent-inspector': 'View agent tool-call logs and audit trail',
46
+ 'config-panel': 'Edit and manage global configuration',
47
+ 'todo': 'Manage tasks as an interactive kanban board',
48
+ 'workflow-yaml': 'Execute step-by-step workflows with AI assistance',
49
+ } as Record<string, string>,
50
+ plugins: 'Extensions',
51
+ changeHistory: 'Change History',
52
+ showMore: 'Show more',
53
+ showLess: 'Show less',
54
+ viewAll: 'View all',
55
+ createToActivate: 'Create {file} to activate',
56
+ shortcuts: {
57
+ searchFiles: 'Search files',
58
+ askAI: 'MindOS Agent',
59
+ editFile: 'Edit file',
60
+ save: 'Save',
61
+ settings: 'Settings',
62
+ },
63
+ relativeTime: {
64
+ justNow: 'just now',
65
+ minutesAgo: (n: number) => `${n}m ago`,
66
+ hoursAgo: (n: number) => `${n}h ago`,
67
+ daysAgo: (n: number) => `${n}d ago`,
68
+ },
69
+ cleanupExamples: (n: number) => `${n} example file${n > 1 ? 's' : ''} from the template can be removed`,
70
+ cleanupExamplesButton: 'Clean up',
71
+ cleanupExamplesDone: 'Example files removed',
72
+ },
73
+ fileTree: {
74
+ newFileTitle: 'New file in this directory',
75
+ rename: 'Rename',
76
+ delete: 'Delete',
77
+ create: 'Create',
78
+ enterFileName: 'Enter a file name',
79
+ failed: 'Failed',
80
+ confirmDelete: (name: string) => `Delete "${name}"? This cannot be undone.`,
81
+ rules: 'Rules',
82
+ about: 'About',
83
+ viewAll: 'View all',
84
+ editRules: 'Edit Rules',
85
+ renameSpace: 'Rename Space',
86
+ deleteSpace: 'Delete Space',
87
+ confirmDeleteSpace: (name: string) => `Delete space "${name}" and all its files? This cannot be undone.`,
88
+ convertToSpace: 'Convert to Space',
89
+ deleteFolder: 'Delete Folder',
90
+ confirmDeleteFolder: (name: string) => `Delete folder "${name}" and all its contents? This cannot be undone.`,
91
+ newFile: 'New File',
92
+ importFile: 'Import File',
93
+ importToSpace: 'Import file to this space',
94
+ copyPath: 'Copy Path',
95
+ pathCopied: 'Path copied',
96
+ },
97
+ fileImport: {
98
+ title: 'Import Files',
99
+ subtitle: 'Save files to your knowledge base or let AI organize them',
100
+ dropzoneText: 'Drag files here, or',
101
+ dropzoneButton: 'click to select',
102
+ dropzoneCompact: 'Drag more files, or',
103
+ dropzoneCompactButton: 'click to add',
104
+ dropzoneMobile: 'Tap to select files',
105
+ fileCount: (n: number) => `${n} file${n !== 1 ? 's' : ''}`,
106
+ clearAll: 'Clear all',
107
+ unsupported: 'Unsupported file type',
108
+ tooLarge: (max: string) => `File too large (max ${max})`,
109
+ archiveTitle: 'Save to Knowledge Base',
110
+ archiveDesc: 'Save as-is to a space',
111
+ digestTitle: 'AI Organize',
112
+ digestDesc: 'Extract key points into notes',
113
+ archiveConfigTitle: 'Save to Knowledge Base',
114
+ back: '← Back',
115
+ targetSpace: 'Target space',
116
+ rootDir: 'Root',
117
+ conflictLabel: 'If file already exists',
118
+ conflictRename: 'Auto-rename (add number suffix)',
119
+ conflictSkip: 'Skip',
120
+ conflictOverwrite: 'Overwrite existing file',
121
+ overwriteWarn: 'This will permanently replace existing file content',
122
+ cancel: 'Cancel',
123
+ importButton: (n: number) => `Save ${n} file${n !== 1 ? 's' : ''}`,
124
+ importing: 'Saving...',
125
+ preparing: 'Preparing...',
126
+ successToast: (n: number, space: string) => `Saved ${n} file${n !== 1 ? 's' : ''} to ${space || 'knowledge base'}`,
127
+ updatedIndex: (n: number) => `Updated ${n} index file${n !== 1 ? 's' : ''}`,
128
+ partialToast: (ok: number, total: number) => `Saved ${ok}/${total} files`,
129
+ skipReason: 'File already exists',
130
+ failToast: 'Import failed',
131
+ retry: 'Retry',
132
+ undo: 'Undo',
133
+ discardTitle: 'Discard import?',
134
+ discardMessage: (n: number) => `Discard ${n} selected file${n !== 1 ? 's' : ''}?`,
135
+ discardConfirm: 'Discard',
136
+ discardCancel: 'Cancel',
137
+ dropOverlay: 'Drop files to import into knowledge base',
138
+ dropOverlayFormats: 'Supports .md .txt .pdf .csv .json .yaml .html',
139
+ onboardingHint: 'Already have notes? Import files →',
140
+ digestPromptSingle: (name: string, targetSpace?: string) => {
141
+ const loc = targetSpace ? ` under the "${targetSpace}" space` : '';
142
+ return `The user uploaded "${name}". You MUST:\n1. Read the content from the "USER-UPLOADED FILES" section above\n2. Extract and reorganize the key information into well-structured Markdown notes\n3. Save the result${loc} in the knowledge base — create new files or update existing ones as appropriate\n\nDo NOT just reply with a text summary. You must actually write to the knowledge base.`;
143
+ },
144
+ digestPromptMulti: (n: number, targetSpace?: string) => {
145
+ const loc = targetSpace ? ` under the "${targetSpace}" space` : '';
146
+ return `The user uploaded ${n} files. You MUST:\n1. Read their content from the "USER-UPLOADED FILES" section above\n2. Extract and reorganize the key information into well-structured Markdown notes\n3. Save the results${loc} in the knowledge base — create new files or update existing ones as appropriate\n\nDo NOT just reply with a text summary. You must actually write to the knowledge base.`;
147
+ },
148
+ arrowTo: '→',
149
+ remove: 'Remove',
150
+ aiRecommended: 'Recommended',
151
+ aiRecommendedHint: 'Auto-matched by filename',
152
+ conflictsFound: (n: number) => `${n} file${n !== 1 ? 's' : ''} already exist${n === 1 ? 's' : ''}`,
153
+ organizeTitle: 'AI Organizing',
154
+ organizeProcessing: 'AI is analyzing and organizing your files...',
155
+ organizeConnecting: 'Connecting to AI...',
156
+ organizeAnalyzing: 'AI is analyzing your files...',
157
+ organizeReading: (detail?: string) => detail ? `Reading ${detail}...` : 'Reading files...',
158
+ organizeThinking: 'AI is thinking deeply...',
159
+ organizeWriting: (detail?: string) => detail ? `Writing ${detail}...` : 'Writing files...',
160
+ organizeElapsed: (seconds: number) => {
161
+ const m = Math.floor(seconds / 60);
162
+ const s = seconds % 60;
163
+ return `${m}:${s.toString().padStart(2, '0')}`;
164
+ },
165
+ organizeCancel: 'Cancel',
166
+ organizeMinimize: 'Continue browsing',
167
+ organizeExpand: 'View',
168
+ organizeCreating: (path: string) => `Creating ${path}`,
169
+ organizeUpdating: (path: string) => `Updating ${path}`,
170
+ organizeReviewTitle: 'Organization Complete',
171
+ organizeErrorTitle: 'Organization Failed',
172
+ organizeReviewDesc: (n: number) => `AI organized your files into ${n} change${n !== 1 ? 's' : ''}`,
173
+ organizeCreated: 'Created',
174
+ organizeUpdated: 'Updated',
175
+ organizeFailed: 'Failed',
176
+ organizeNoChanges: 'AI analyzed your files but made no changes.',
177
+ organizeToolCallsInfo: (n: number) => `AI executed ${n} operation${n > 1 ? 's' : ''} — check knowledge base for updates`,
178
+ organizeError: 'Organization failed',
179
+ organizeRetry: 'Retry',
180
+ organizeDone: 'Done',
181
+ organizeUndoAll: 'Undo All',
182
+ organizeUndoOne: 'Undo',
183
+ organizeUndone: 'Undone',
184
+ organizeViewFile: 'View file',
185
+ organizeUndoSuccess: (n: number) => `Reverted ${n} file${n !== 1 ? 's' : ''}`,
186
+ organizeDetailTitle: 'AI Organize Details',
187
+ organizeSourceFiles: 'Source Files',
188
+ organizeSummaryLabel: 'AI Summary',
189
+ organizeChangesLabel: (n: number) => `Changes (${n})`,
190
+ organizeNoSummary: 'AI is working...',
191
+ organizeMinimizeModal: 'Minimize',
192
+ },
193
+ importHistory: {
194
+ title: 'Import History',
195
+ clearAll: 'Clear history',
196
+ emptyTitle: 'No import history yet',
197
+ emptyDesc: 'AI organize results will appear here',
198
+ },
199
+ dirView: {
200
+ gridView: 'Grid view',
201
+ listView: 'List view',
202
+ emptyFolder: 'This folder is empty.',
203
+ fileCount: (n: number) => `${n} files`,
204
+ newFile: 'New file',
205
+ },
206
+ view: {
207
+ saveDirectory: 'Directory',
208
+ saveFileName: 'File name',
209
+ },
210
+ findInPage: {
211
+ placeholder: 'Find in document…',
212
+ matchCount: (current: number, total: number) => `${current} of ${total}`,
213
+ noResults: 'No results',
214
+ },
215
+ } as const;
216
+
217
+ export const knowledgeZh = {
218
+ home: {
219
+ recentlyModified: '最近修改',
220
+ recentlyActive: '最近活跃',
221
+ recentlyEdited: '最近编辑',
222
+ allSpaces: '所有空间',
223
+ spaces: '心智空间',
224
+ nFiles: (n: number) => `${n} 个文件`,
225
+ other: '其他',
226
+ newSpace: '新建空间',
227
+ spaceName: '空间名称',
228
+ spaceDescription: '描述',
229
+ spaceDescPlaceholder: '描述这个空间的用途',
230
+ spaceNameNoSlash: '名称不能包含 / 或 \\',
231
+ spaceExists: '已存在同名空间',
232
+ spaceCreateFailed: '创建空间失败',
233
+ noSpacesYet: '还没有空间,创建一个来整理你的知识吧。',
234
+ spaceLocation: '位置',
235
+ rootLevel: '根目录',
236
+ optional: '可选',
237
+ aiInit: 'AI 初始化内容',
238
+ aiInitHint: 'AI 将自动生成空间说明和操作指南',
239
+ aiInitNoKey: '在 设置 → AI 中配置 API 密钥以启用',
240
+ aiInitGenerating: (name: string) => `正在为「${name}」生成内容`,
241
+ aiInitReady: (name: string) => `「${name}」已就绪`,
242
+ aiInitReview: '查看',
243
+ aiInitDiscard: '撤销',
244
+ aiInitReverted: (name: string) => `「${name}」已恢复为模板`,
245
+ createSpace: '创建',
246
+ cancelCreate: '取消',
247
+ continueEditing: '继续编辑',
248
+ newNote: '新建笔记',
249
+ builtinFeatures: '工具面板',
250
+ builtinActive: '已启用',
251
+ builtinInactive: '未激活',
252
+ toolName: {
253
+ 'agent-inspector': '审计面板',
254
+ 'config-panel': '配置面板',
255
+ 'todo': '待办面板',
256
+ 'workflow-yaml': '工作流',
257
+ } as Record<string, string>,
258
+ toolDesc: {
259
+ 'agent-inspector': '查看 Agent 操作日志与调用轨迹',
260
+ 'config-panel': '编辑和管理全局配置项',
261
+ 'todo': '以看板形式管理待办事项',
262
+ 'workflow-yaml': '执行多步骤工作流,AI 辅助执行',
263
+ } as Record<string, string>,
264
+ plugins: '扩展',
265
+ changeHistory: '变更历史',
266
+ showMore: '查看更多',
267
+ showLess: '收起',
268
+ viewAll: '查看全部',
269
+ createToActivate: '创建 {file} 以启用',
270
+ shortcuts: {
271
+ searchFiles: '搜索文件',
272
+ askAI: 'MindOS Agent',
273
+ editFile: '编辑文件',
274
+ save: '保存',
275
+ settings: '设置',
276
+ },
277
+ relativeTime: {
278
+ justNow: '刚刚',
279
+ minutesAgo: (n: number) => `${n} 分钟前`,
280
+ hoursAgo: (n: number) => `${n} 小时前`,
281
+ daysAgo: (n: number) => `${n} 天前`,
282
+ },
283
+ cleanupExamples: (n: number) => `有 ${n} 个模板示例文件可以清理`,
284
+ cleanupExamplesButton: '一键清理',
285
+ cleanupExamplesDone: '示例文件已清理',
286
+ },
287
+ fileTree: {
288
+ newFileTitle: '在此目录新建文件',
289
+ rename: '重命名',
290
+ delete: '删除',
291
+ create: '创建',
292
+ enterFileName: '请输入文件名',
293
+ failed: '操作失败',
294
+ confirmDelete: (name: string) => `确定删除「${name}」?此操作不可撤销。`,
295
+ rules: '规则',
296
+ about: '说明',
297
+ viewAll: '查看全部',
298
+ editRules: '编辑规则',
299
+ renameSpace: '重命名空间',
300
+ deleteSpace: '删除空间',
301
+ confirmDeleteSpace: (name: string) => `删除空间「${name}」及其所有文件?此操作不可撤销。`,
302
+ convertToSpace: '转为空间',
303
+ deleteFolder: '删除文件夹',
304
+ confirmDeleteFolder: (name: string) => `删除文件夹「${name}」及其所有内容?此操作不可撤销。`,
305
+ newFile: '新建文件',
306
+ importFile: '导入文件',
307
+ importToSpace: '导入文件到此空间',
308
+ copyPath: '复制路径',
309
+ pathCopied: '路径已复制',
310
+ },
311
+ fileImport: {
312
+ title: '导入文件',
313
+ subtitle: '将外部文件存入知识库或让 AI 帮你整理',
314
+ dropzoneText: '拖拽文件到这里,或',
315
+ dropzoneButton: '点击选择',
316
+ dropzoneCompact: '拖拽更多文件,或',
317
+ dropzoneCompactButton: '点击添加',
318
+ dropzoneMobile: '点击选择文件',
319
+ fileCount: (n: number) => `${n} 个文件`,
320
+ clearAll: '清空全部',
321
+ unsupported: '不支持的文件类型',
322
+ tooLarge: (max: string) => `文件过大(最大 ${max})`,
323
+ archiveTitle: '存入知识库',
324
+ archiveDesc: '原样归档到指定空间',
325
+ digestTitle: 'AI 帮我整理',
326
+ digestDesc: '提取要点,沉淀到笔记',
327
+ archiveConfigTitle: '存入知识库',
328
+ back: '← 返回',
329
+ targetSpace: '目标空间',
330
+ rootDir: '根目录',
331
+ conflictLabel: '同名文件已存在时',
332
+ conflictRename: '自动重命名(添加序号后缀)',
333
+ conflictSkip: '跳过不导入',
334
+ conflictOverwrite: '覆盖已有文件',
335
+ overwriteWarn: '将永久替换已有文件内容',
336
+ cancel: '取消',
337
+ importButton: (n: number) => `存入 ${n} 个文件`,
338
+ importing: '正在存入...',
339
+ preparing: '准备中...',
340
+ successToast: (n: number, space: string) => `已存入 ${n} 个文件到 ${space || '知识库'}`,
341
+ updatedIndex: (n: number) => `更新了 ${n} 个索引文件`,
342
+ partialToast: (ok: number, total: number) => `存入 ${ok}/${total} 个文件`,
343
+ skipReason: '同名文件已存在',
344
+ failToast: '导入失败',
345
+ retry: '重试',
346
+ undo: '撤销',
347
+ discardTitle: '放弃导入?',
348
+ discardMessage: (n: number) => `放弃已选的 ${n} 个文件?`,
349
+ discardConfirm: '放弃',
350
+ discardCancel: '取消',
351
+ dropOverlay: '松开鼠标,导入文件到知识库',
352
+ dropOverlayFormats: '支持 .md .txt .pdf .csv .json .yaml .html',
353
+ onboardingHint: '已有笔记?导入文件到知识库 →',
354
+ digestPromptSingle: (name: string, targetSpace?: string) => {
355
+ const loc = targetSpace ? `"${targetSpace}" 空间下` : '知识库中合适的位置';
356
+ return `用户上传了「${name}」。你必须:\n1. 从上方「USER-UPLOADED FILES」区域读取文件内容\n2. 提取和重新整理关键信息为结构清晰的 Markdown 笔记\n3. 将整理后的内容保存到${loc}——可以创建新文件,也可以更新已有文件\n\n不要只做文字回复。你必须实际写入知识库。`;
357
+ },
358
+ digestPromptMulti: (n: number, targetSpace?: string) => {
359
+ const loc = targetSpace ? `"${targetSpace}" 空间下` : '知识库中合适的位置';
360
+ return `用户上传了 ${n} 个文件。你必须:\n1. 从上方「USER-UPLOADED FILES」区域读取它们的内容\n2. 提取和重新整理关键信息为结构清晰的 Markdown 笔记\n3. 将整理后的内容保存到${loc}——可以创建新文件,也可以更新已有文件\n\n不要只做文字回复。你必须实际写入知识库。`;
361
+ },
362
+ arrowTo: '→',
363
+ remove: '移除',
364
+ aiRecommended: '推荐',
365
+ aiRecommendedHint: '根据文件名自动匹配',
366
+ conflictsFound: (n: number) => `${n} 个文件已存在`,
367
+ organizeTitle: 'AI 整理中',
368
+ organizeProcessing: 'AI 正在分析和整理你的文件...',
369
+ organizeConnecting: '正在连接 AI...',
370
+ organizeAnalyzing: 'AI 正在分析你的文件...',
371
+ organizeReading: (detail?: string) => detail ? `正在阅读 ${detail}...` : '正在阅读文件...',
372
+ organizeThinking: 'AI 正在深度思考...',
373
+ organizeWriting: (detail?: string) => detail ? `正在写入 ${detail}...` : '正在写入文件...',
374
+ organizeElapsed: (seconds: number) => {
375
+ const m = Math.floor(seconds / 60);
376
+ const s = seconds % 60;
377
+ return `${m}:${s.toString().padStart(2, '0')}`;
378
+ },
379
+ organizeCancel: '取消',
380
+ organizeMinimize: '继续浏览',
381
+ organizeExpand: '查看',
382
+ organizeCreating: (path: string) => `正在创建 ${path}`,
383
+ organizeUpdating: (path: string) => `正在更新 ${path}`,
384
+ organizeReviewTitle: '整理完成',
385
+ organizeErrorTitle: '整理失败',
386
+ organizeReviewDesc: (n: number) => `AI 整理了 ${n} 处变更`,
387
+ organizeCreated: '已创建',
388
+ organizeUpdated: '已更新',
389
+ organizeFailed: '失败',
390
+ organizeNoChanges: 'AI 分析了你的文件,但没有做任何更改。',
391
+ organizeToolCallsInfo: (n: number) => `AI 执行了 ${n} 个操作 — 请检查知识库查看更新`,
392
+ organizeError: '整理失败',
393
+ organizeRetry: '重试',
394
+ organizeDone: '完成',
395
+ organizeUndoAll: '撤销全部',
396
+ organizeUndoOne: '撤销',
397
+ organizeUndone: '已撤销',
398
+ organizeViewFile: '查看文件',
399
+ organizeUndoSuccess: (n: number) => `已撤销 ${n} 个文件`,
400
+ organizeDetailTitle: 'AI 整理详情',
401
+ organizeSourceFiles: '源文件',
402
+ organizeSummaryLabel: 'AI 总结',
403
+ organizeChangesLabel: (n: number) => `变更列表 (${n})`,
404
+ organizeNoSummary: 'AI 正在处理中...',
405
+ organizeMinimizeModal: '最小化',
406
+ },
407
+ importHistory: {
408
+ title: '导入历史',
409
+ clearAll: '清空历史',
410
+ emptyTitle: '暂无导入记录',
411
+ emptyDesc: 'AI 整理的结果会出现在这里',
412
+ },
413
+ dirView: {
414
+ gridView: '网格视图',
415
+ listView: '列表视图',
416
+ emptyFolder: '此目录为空。',
417
+ fileCount: (n: number) => `${n} 个文件`,
418
+ newFile: '新建文件',
419
+ },
420
+ view: {
421
+ saveDirectory: '目录',
422
+ saveFileName: '文件名',
423
+ },
424
+ findInPage: {
425
+ placeholder: '在文档中查找…',
426
+ matchCount: (current: number, total: number) => `${current} / ${total}`,
427
+ noResults: '无结果',
428
+ },
429
+ };