@geminilight/mindos 0.6.27 → 0.6.29

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 (67) hide show
  1. package/app/app/api/a2a/agents/route.ts +9 -0
  2. package/app/app/api/a2a/delegations/route.ts +9 -0
  3. package/app/app/api/a2a/discover/route.ts +2 -0
  4. package/app/app/api/a2a/route.ts +6 -6
  5. package/app/app/api/acp/detect/route.ts +91 -0
  6. package/app/app/api/acp/registry/route.ts +31 -0
  7. package/app/app/api/acp/session/route.ts +55 -0
  8. package/app/app/layout.tsx +2 -0
  9. package/app/components/DirView.tsx +64 -2
  10. package/app/components/FileTree.tsx +19 -0
  11. package/app/components/GuideCard.tsx +7 -17
  12. package/app/components/MarkdownView.tsx +2 -0
  13. package/app/components/SearchModal.tsx +234 -80
  14. package/app/components/agents/AgentDetailContent.tsx +51 -6
  15. package/app/components/agents/AgentsContentPage.tsx +24 -6
  16. package/app/components/agents/AgentsOverviewSection.tsx +11 -0
  17. package/app/components/agents/AgentsPanelA2aTab.tsx +445 -0
  18. package/app/components/agents/SkillDetailPopover.tsx +4 -9
  19. package/app/components/agents/agents-content-model.ts +2 -2
  20. package/app/components/ask/AskContent.tsx +8 -0
  21. package/app/components/help/HelpContent.tsx +74 -18
  22. package/app/components/panels/AgentsPanel.tsx +1 -0
  23. package/app/components/panels/AgentsPanelAgentDetail.tsx +5 -8
  24. package/app/components/panels/AgentsPanelAgentListRow.tsx +10 -1
  25. package/app/components/panels/AgentsPanelHubNav.tsx +8 -1
  26. package/app/components/panels/EchoPanel.tsx +5 -1
  27. package/app/components/panels/EchoSidebarStats.tsx +136 -0
  28. package/app/components/settings/KnowledgeTab.tsx +3 -6
  29. package/app/components/settings/McpSkillsSection.tsx +4 -5
  30. package/app/components/settings/McpTab.tsx +6 -8
  31. package/app/components/setup/StepSecurity.tsx +4 -5
  32. package/app/components/setup/index.tsx +5 -11
  33. package/app/components/ui/Toaster.tsx +39 -0
  34. package/app/hooks/useA2aRegistry.ts +6 -1
  35. package/app/hooks/useAcpDetection.ts +65 -0
  36. package/app/hooks/useAcpRegistry.ts +51 -0
  37. package/app/hooks/useDelegationHistory.ts +49 -0
  38. package/app/lib/a2a/client.ts +49 -5
  39. package/app/lib/a2a/orchestrator.ts +0 -1
  40. package/app/lib/a2a/task-handler.ts +4 -4
  41. package/app/lib/a2a/types.ts +15 -0
  42. package/app/lib/acp/acp-tools.ts +93 -0
  43. package/app/lib/acp/bridge.ts +138 -0
  44. package/app/lib/acp/index.ts +24 -0
  45. package/app/lib/acp/registry.ts +135 -0
  46. package/app/lib/acp/session.ts +264 -0
  47. package/app/lib/acp/subprocess.ts +209 -0
  48. package/app/lib/acp/types.ts +136 -0
  49. package/app/lib/agent/tools.ts +2 -1
  50. package/app/lib/i18n/_core.ts +22 -0
  51. package/app/lib/i18n/index.ts +35 -0
  52. package/app/lib/i18n/modules/ai-chat.ts +215 -0
  53. package/app/lib/i18n/modules/common.ts +71 -0
  54. package/app/lib/i18n/modules/features.ts +153 -0
  55. package/app/lib/i18n/modules/knowledge.ts +425 -0
  56. package/app/lib/i18n/modules/navigation.ts +151 -0
  57. package/app/lib/i18n/modules/onboarding.ts +523 -0
  58. package/app/lib/i18n/modules/panels.ts +1052 -0
  59. package/app/lib/i18n/modules/settings.ts +585 -0
  60. package/app/lib/i18n-en.ts +2 -1518
  61. package/app/lib/i18n-zh.ts +2 -1542
  62. package/app/lib/i18n.ts +3 -6
  63. package/app/lib/toast.ts +79 -0
  64. package/bin/cli.js +25 -25
  65. package/bin/commands/file.js +29 -2
  66. package/bin/commands/space.js +249 -91
  67. package/package.json +1 -1
@@ -0,0 +1,425 @@
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
+ } as Record<string, string>,
43
+ toolDesc: {
44
+ 'agent-inspector': 'View agent tool-call logs and audit trail',
45
+ 'config-panel': 'Edit and manage global configuration',
46
+ 'todo': 'Manage tasks as an interactive kanban board',
47
+ } as Record<string, string>,
48
+ plugins: 'Extensions',
49
+ changeHistory: 'Change History',
50
+ showMore: 'Show more',
51
+ showLess: 'Show less',
52
+ viewAll: 'View all',
53
+ createToActivate: 'Create {file} to activate',
54
+ shortcuts: {
55
+ searchFiles: 'Search files',
56
+ askAI: 'MindOS Agent',
57
+ editFile: 'Edit file',
58
+ save: 'Save',
59
+ settings: 'Settings',
60
+ },
61
+ relativeTime: {
62
+ justNow: 'just now',
63
+ minutesAgo: (n: number) => `${n}m ago`,
64
+ hoursAgo: (n: number) => `${n}h ago`,
65
+ daysAgo: (n: number) => `${n}d ago`,
66
+ },
67
+ cleanupExamples: (n: number) => `${n} example file${n > 1 ? 's' : ''} from the template can be removed`,
68
+ cleanupExamplesButton: 'Clean up',
69
+ cleanupExamplesDone: 'Example files removed',
70
+ },
71
+ fileTree: {
72
+ newFileTitle: 'New file in this directory',
73
+ rename: 'Rename',
74
+ delete: 'Delete',
75
+ create: 'Create',
76
+ enterFileName: 'Enter a file name',
77
+ failed: 'Failed',
78
+ confirmDelete: (name: string) => `Delete "${name}"? This cannot be undone.`,
79
+ rules: 'Rules',
80
+ about: 'About',
81
+ viewAll: 'View all',
82
+ editRules: 'Edit Rules',
83
+ renameSpace: 'Rename Space',
84
+ deleteSpace: 'Delete Space',
85
+ confirmDeleteSpace: (name: string) => `Delete space "${name}" and all its files? This cannot be undone.`,
86
+ convertToSpace: 'Convert to Space',
87
+ deleteFolder: 'Delete Folder',
88
+ confirmDeleteFolder: (name: string) => `Delete folder "${name}" and all its contents? This cannot be undone.`,
89
+ newFile: 'New File',
90
+ importFile: 'Import File',
91
+ importToSpace: 'Import file to this space',
92
+ copyPath: 'Copy Path',
93
+ pathCopied: 'Path copied',
94
+ },
95
+ fileImport: {
96
+ title: 'Import Files',
97
+ subtitle: 'Save files to your knowledge base or let AI organize them',
98
+ dropzoneText: 'Drag files here, or',
99
+ dropzoneButton: 'click to select',
100
+ dropzoneCompact: 'Drag more files, or',
101
+ dropzoneCompactButton: 'click to add',
102
+ dropzoneMobile: 'Tap to select files',
103
+ fileCount: (n: number) => `${n} file${n !== 1 ? 's' : ''}`,
104
+ clearAll: 'Clear all',
105
+ unsupported: 'Unsupported file type',
106
+ tooLarge: (max: string) => `File too large (max ${max})`,
107
+ archiveTitle: 'Save to Knowledge Base',
108
+ archiveDesc: 'Save as-is to a space',
109
+ digestTitle: 'AI Organize',
110
+ digestDesc: 'Extract key points into notes',
111
+ archiveConfigTitle: 'Save to Knowledge Base',
112
+ back: '← Back',
113
+ targetSpace: 'Target space',
114
+ rootDir: 'Root',
115
+ conflictLabel: 'If file already exists',
116
+ conflictRename: 'Auto-rename (add number suffix)',
117
+ conflictSkip: 'Skip',
118
+ conflictOverwrite: 'Overwrite existing file',
119
+ overwriteWarn: 'This will permanently replace existing file content',
120
+ cancel: 'Cancel',
121
+ importButton: (n: number) => `Save ${n} file${n !== 1 ? 's' : ''}`,
122
+ importing: 'Saving...',
123
+ preparing: 'Preparing...',
124
+ successToast: (n: number, space: string) => `Saved ${n} file${n !== 1 ? 's' : ''} to ${space || 'knowledge base'}`,
125
+ updatedIndex: (n: number) => `Updated ${n} index file${n !== 1 ? 's' : ''}`,
126
+ partialToast: (ok: number, total: number) => `Saved ${ok}/${total} files`,
127
+ skipReason: 'File already exists',
128
+ failToast: 'Import failed',
129
+ retry: 'Retry',
130
+ undo: 'Undo',
131
+ discardTitle: 'Discard import?',
132
+ discardMessage: (n: number) => `Discard ${n} selected file${n !== 1 ? 's' : ''}?`,
133
+ discardConfirm: 'Discard',
134
+ discardCancel: 'Cancel',
135
+ dropOverlay: 'Drop files to import into knowledge base',
136
+ dropOverlayFormats: 'Supports .md .txt .pdf .csv .json .yaml .html',
137
+ onboardingHint: 'Already have notes? Import files →',
138
+ digestPromptSingle: (name: string, targetSpace?: string) => {
139
+ const loc = targetSpace ? ` under the "${targetSpace}" space` : '';
140
+ 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.`;
141
+ },
142
+ digestPromptMulti: (n: number, targetSpace?: string) => {
143
+ const loc = targetSpace ? ` under the "${targetSpace}" space` : '';
144
+ 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.`;
145
+ },
146
+ arrowTo: '→',
147
+ remove: 'Remove',
148
+ aiRecommended: 'Recommended',
149
+ aiRecommendedHint: 'Auto-matched by filename',
150
+ conflictsFound: (n: number) => `${n} file${n !== 1 ? 's' : ''} already exist${n === 1 ? 's' : ''}`,
151
+ organizeTitle: 'AI Organizing',
152
+ organizeProcessing: 'AI is analyzing and organizing your files...',
153
+ organizeConnecting: 'Connecting to AI...',
154
+ organizeAnalyzing: 'AI is analyzing your files...',
155
+ organizeReading: (detail?: string) => detail ? `Reading ${detail}...` : 'Reading files...',
156
+ organizeThinking: 'AI is thinking deeply...',
157
+ organizeWriting: (detail?: string) => detail ? `Writing ${detail}...` : 'Writing files...',
158
+ organizeElapsed: (seconds: number) => {
159
+ const m = Math.floor(seconds / 60);
160
+ const s = seconds % 60;
161
+ return `${m}:${s.toString().padStart(2, '0')}`;
162
+ },
163
+ organizeCancel: 'Cancel',
164
+ organizeMinimize: 'Continue browsing',
165
+ organizeExpand: 'View',
166
+ organizeCreating: (path: string) => `Creating ${path}`,
167
+ organizeUpdating: (path: string) => `Updating ${path}`,
168
+ organizeReviewTitle: 'Organization Complete',
169
+ organizeErrorTitle: 'Organization Failed',
170
+ organizeReviewDesc: (n: number) => `AI organized your files into ${n} change${n !== 1 ? 's' : ''}`,
171
+ organizeCreated: 'Created',
172
+ organizeUpdated: 'Updated',
173
+ organizeFailed: 'Failed',
174
+ organizeNoChanges: 'AI analyzed your files but made no changes.',
175
+ organizeToolCallsInfo: (n: number) => `AI executed ${n} operation${n > 1 ? 's' : ''} — check knowledge base for updates`,
176
+ organizeError: 'Organization failed',
177
+ organizeRetry: 'Retry',
178
+ organizeDone: 'Done',
179
+ organizeUndoAll: 'Undo All',
180
+ organizeUndoOne: 'Undo',
181
+ organizeUndone: 'Undone',
182
+ organizeViewFile: 'View file',
183
+ organizeUndoSuccess: (n: number) => `Reverted ${n} file${n !== 1 ? 's' : ''}`,
184
+ organizeDetailTitle: 'AI Organize Details',
185
+ organizeSourceFiles: 'Source Files',
186
+ organizeSummaryLabel: 'AI Summary',
187
+ organizeChangesLabel: (n: number) => `Changes (${n})`,
188
+ organizeNoSummary: 'AI is working...',
189
+ organizeMinimizeModal: 'Minimize',
190
+ },
191
+ importHistory: {
192
+ title: 'Import History',
193
+ clearAll: 'Clear history',
194
+ emptyTitle: 'No import history yet',
195
+ emptyDesc: 'AI organize results will appear here',
196
+ },
197
+ dirView: {
198
+ gridView: 'Grid view',
199
+ listView: 'List view',
200
+ emptyFolder: 'This folder is empty.',
201
+ fileCount: (n: number) => `${n} files`,
202
+ newFile: 'New file',
203
+ },
204
+ view: {
205
+ saveDirectory: 'Directory',
206
+ saveFileName: 'File name',
207
+ },
208
+ findInPage: {
209
+ placeholder: 'Find in document…',
210
+ matchCount: (current: number, total: number) => `${current} of ${total}`,
211
+ noResults: 'No results',
212
+ },
213
+ } as const;
214
+
215
+ export const knowledgeZh = {
216
+ home: {
217
+ recentlyModified: '最近修改',
218
+ recentlyActive: '最近活跃',
219
+ recentlyEdited: '最近编辑',
220
+ allSpaces: '所有空间',
221
+ spaces: '心智空间',
222
+ nFiles: (n: number) => `${n} 个文件`,
223
+ other: '其他',
224
+ newSpace: '新建空间',
225
+ spaceName: '空间名称',
226
+ spaceDescription: '描述',
227
+ spaceDescPlaceholder: '描述这个空间的用途',
228
+ spaceNameNoSlash: '名称不能包含 / 或 \\',
229
+ spaceExists: '已存在同名空间',
230
+ spaceCreateFailed: '创建空间失败',
231
+ noSpacesYet: '还没有空间,创建一个来整理你的知识吧。',
232
+ spaceLocation: '位置',
233
+ rootLevel: '根目录',
234
+ optional: '可选',
235
+ aiInit: 'AI 初始化内容',
236
+ aiInitHint: 'AI 将自动生成空间说明和操作指南',
237
+ aiInitNoKey: '在 设置 → AI 中配置 API 密钥以启用',
238
+ aiInitGenerating: (name: string) => `正在为「${name}」生成内容`,
239
+ aiInitReady: (name: string) => `「${name}」已就绪`,
240
+ aiInitReview: '查看',
241
+ aiInitDiscard: '撤销',
242
+ aiInitReverted: (name: string) => `「${name}」已恢复为模板`,
243
+ createSpace: '创建',
244
+ cancelCreate: '取消',
245
+ continueEditing: '继续编辑',
246
+ newNote: '新建笔记',
247
+ builtinFeatures: '工具面板',
248
+ builtinActive: '已启用',
249
+ builtinInactive: '未激活',
250
+ toolName: {
251
+ 'agent-inspector': '审计面板',
252
+ 'config-panel': '配置面板',
253
+ 'todo': '待办面板',
254
+ } as Record<string, string>,
255
+ toolDesc: {
256
+ 'agent-inspector': '查看 Agent 操作日志与调用轨迹',
257
+ 'config-panel': '编辑和管理全局配置项',
258
+ 'todo': '以看板形式管理待办事项',
259
+ } as Record<string, string>,
260
+ plugins: '扩展',
261
+ changeHistory: '变更历史',
262
+ showMore: '查看更多',
263
+ showLess: '收起',
264
+ viewAll: '查看全部',
265
+ createToActivate: '创建 {file} 以启用',
266
+ shortcuts: {
267
+ searchFiles: '搜索文件',
268
+ askAI: 'MindOS Agent',
269
+ editFile: '编辑文件',
270
+ save: '保存',
271
+ settings: '设置',
272
+ },
273
+ relativeTime: {
274
+ justNow: '刚刚',
275
+ minutesAgo: (n: number) => `${n} 分钟前`,
276
+ hoursAgo: (n: number) => `${n} 小时前`,
277
+ daysAgo: (n: number) => `${n} 天前`,
278
+ },
279
+ cleanupExamples: (n: number) => `有 ${n} 个模板示例文件可以清理`,
280
+ cleanupExamplesButton: '一键清理',
281
+ cleanupExamplesDone: '示例文件已清理',
282
+ },
283
+ fileTree: {
284
+ newFileTitle: '在此目录新建文件',
285
+ rename: '重命名',
286
+ delete: '删除',
287
+ create: '创建',
288
+ enterFileName: '请输入文件名',
289
+ failed: '操作失败',
290
+ confirmDelete: (name: string) => `确定删除「${name}」?此操作不可撤销。`,
291
+ rules: '规则',
292
+ about: '说明',
293
+ viewAll: '查看全部',
294
+ editRules: '编辑规则',
295
+ renameSpace: '重命名空间',
296
+ deleteSpace: '删除空间',
297
+ confirmDeleteSpace: (name: string) => `删除空间「${name}」及其所有文件?此操作不可撤销。`,
298
+ convertToSpace: '转为空间',
299
+ deleteFolder: '删除文件夹',
300
+ confirmDeleteFolder: (name: string) => `删除文件夹「${name}」及其所有内容?此操作不可撤销。`,
301
+ newFile: '新建文件',
302
+ importFile: '导入文件',
303
+ importToSpace: '导入文件到此空间',
304
+ copyPath: '复制路径',
305
+ pathCopied: '路径已复制',
306
+ },
307
+ fileImport: {
308
+ title: '导入文件',
309
+ subtitle: '将外部文件存入知识库或让 AI 帮你整理',
310
+ dropzoneText: '拖拽文件到这里,或',
311
+ dropzoneButton: '点击选择',
312
+ dropzoneCompact: '拖拽更多文件,或',
313
+ dropzoneCompactButton: '点击添加',
314
+ dropzoneMobile: '点击选择文件',
315
+ fileCount: (n: number) => `${n} 个文件`,
316
+ clearAll: '清空全部',
317
+ unsupported: '不支持的文件类型',
318
+ tooLarge: (max: string) => `文件过大(最大 ${max})`,
319
+ archiveTitle: '存入知识库',
320
+ archiveDesc: '原样归档到指定空间',
321
+ digestTitle: 'AI 帮我整理',
322
+ digestDesc: '提取要点,沉淀到笔记',
323
+ archiveConfigTitle: '存入知识库',
324
+ back: '← 返回',
325
+ targetSpace: '目标空间',
326
+ rootDir: '根目录',
327
+ conflictLabel: '同名文件已存在时',
328
+ conflictRename: '自动重命名(添加序号后缀)',
329
+ conflictSkip: '跳过不导入',
330
+ conflictOverwrite: '覆盖已有文件',
331
+ overwriteWarn: '将永久替换已有文件内容',
332
+ cancel: '取消',
333
+ importButton: (n: number) => `存入 ${n} 个文件`,
334
+ importing: '正在存入...',
335
+ preparing: '准备中...',
336
+ successToast: (n: number, space: string) => `已存入 ${n} 个文件到 ${space || '知识库'}`,
337
+ updatedIndex: (n: number) => `更新了 ${n} 个索引文件`,
338
+ partialToast: (ok: number, total: number) => `存入 ${ok}/${total} 个文件`,
339
+ skipReason: '同名文件已存在',
340
+ failToast: '导入失败',
341
+ retry: '重试',
342
+ undo: '撤销',
343
+ discardTitle: '放弃导入?',
344
+ discardMessage: (n: number) => `放弃已选的 ${n} 个文件?`,
345
+ discardConfirm: '放弃',
346
+ discardCancel: '取消',
347
+ dropOverlay: '松开鼠标,导入文件到知识库',
348
+ dropOverlayFormats: '支持 .md .txt .pdf .csv .json .yaml .html',
349
+ onboardingHint: '已有笔记?导入文件到知识库 →',
350
+ digestPromptSingle: (name: string, targetSpace?: string) => {
351
+ const loc = targetSpace ? `"${targetSpace}" 空间下` : '知识库中合适的位置';
352
+ return `用户上传了「${name}」。你必须:\n1. 从上方「USER-UPLOADED FILES」区域读取文件内容\n2. 提取和重新整理关键信息为结构清晰的 Markdown 笔记\n3. 将整理后的内容保存到${loc}——可以创建新文件,也可以更新已有文件\n\n不要只做文字回复。你必须实际写入知识库。`;
353
+ },
354
+ digestPromptMulti: (n: number, targetSpace?: string) => {
355
+ const loc = targetSpace ? `"${targetSpace}" 空间下` : '知识库中合适的位置';
356
+ return `用户上传了 ${n} 个文件。你必须:\n1. 从上方「USER-UPLOADED FILES」区域读取它们的内容\n2. 提取和重新整理关键信息为结构清晰的 Markdown 笔记\n3. 将整理后的内容保存到${loc}——可以创建新文件,也可以更新已有文件\n\n不要只做文字回复。你必须实际写入知识库。`;
357
+ },
358
+ arrowTo: '→',
359
+ remove: '移除',
360
+ aiRecommended: '推荐',
361
+ aiRecommendedHint: '根据文件名自动匹配',
362
+ conflictsFound: (n: number) => `${n} 个文件已存在`,
363
+ organizeTitle: 'AI 整理中',
364
+ organizeProcessing: 'AI 正在分析和整理你的文件...',
365
+ organizeConnecting: '正在连接 AI...',
366
+ organizeAnalyzing: 'AI 正在分析你的文件...',
367
+ organizeReading: (detail?: string) => detail ? `正在阅读 ${detail}...` : '正在阅读文件...',
368
+ organizeThinking: 'AI 正在深度思考...',
369
+ organizeWriting: (detail?: string) => detail ? `正在写入 ${detail}...` : '正在写入文件...',
370
+ organizeElapsed: (seconds: number) => {
371
+ const m = Math.floor(seconds / 60);
372
+ const s = seconds % 60;
373
+ return `${m}:${s.toString().padStart(2, '0')}`;
374
+ },
375
+ organizeCancel: '取消',
376
+ organizeMinimize: '继续浏览',
377
+ organizeExpand: '查看',
378
+ organizeCreating: (path: string) => `正在创建 ${path}`,
379
+ organizeUpdating: (path: string) => `正在更新 ${path}`,
380
+ organizeReviewTitle: '整理完成',
381
+ organizeErrorTitle: '整理失败',
382
+ organizeReviewDesc: (n: number) => `AI 整理了 ${n} 处变更`,
383
+ organizeCreated: '已创建',
384
+ organizeUpdated: '已更新',
385
+ organizeFailed: '失败',
386
+ organizeNoChanges: 'AI 分析了你的文件,但没有做任何更改。',
387
+ organizeToolCallsInfo: (n: number) => `AI 执行了 ${n} 个操作 — 请检查知识库查看更新`,
388
+ organizeError: '整理失败',
389
+ organizeRetry: '重试',
390
+ organizeDone: '完成',
391
+ organizeUndoAll: '撤销全部',
392
+ organizeUndoOne: '撤销',
393
+ organizeUndone: '已撤销',
394
+ organizeViewFile: '查看文件',
395
+ organizeUndoSuccess: (n: number) => `已撤销 ${n} 个文件`,
396
+ organizeDetailTitle: 'AI 整理详情',
397
+ organizeSourceFiles: '源文件',
398
+ organizeSummaryLabel: 'AI 总结',
399
+ organizeChangesLabel: (n: number) => `变更列表 (${n})`,
400
+ organizeNoSummary: 'AI 正在处理中...',
401
+ organizeMinimizeModal: '最小化',
402
+ },
403
+ importHistory: {
404
+ title: '导入历史',
405
+ clearAll: '清空历史',
406
+ emptyTitle: '暂无导入记录',
407
+ emptyDesc: 'AI 整理的结果会出现在这里',
408
+ },
409
+ dirView: {
410
+ gridView: '网格视图',
411
+ listView: '列表视图',
412
+ emptyFolder: '此目录为空。',
413
+ fileCount: (n: number) => `${n} 个文件`,
414
+ newFile: '新建文件',
415
+ },
416
+ view: {
417
+ saveDirectory: '目录',
418
+ saveFileName: '文件名',
419
+ },
420
+ findInPage: {
421
+ placeholder: '在文档中查找…',
422
+ matchCount: (current: number, total: number) => `${current} / ${total}`,
423
+ noResults: '无结果',
424
+ },
425
+ };
@@ -0,0 +1,151 @@
1
+ // sidebar + search + shortcutPanel
2
+
3
+ export const navigationEn = {
4
+ sidebar: {
5
+ files: 'Spaces',
6
+ search: 'Search',
7
+ searchTitle: 'Search',
8
+ askTitle: 'MindOS Agent',
9
+ settingsTitle: 'Settings',
10
+ plugins: 'Plugins',
11
+ agents: 'Agents',
12
+ echo: 'Echo',
13
+ discover: 'Discover',
14
+ history: 'History',
15
+ help: 'Help',
16
+ syncLabel: 'Sync',
17
+ collapseTitle: 'Collapse sidebar',
18
+ expandTitle: 'Expand sidebar',
19
+ collapseLevel: 'Collapse one level',
20
+ collapseLevelHint: 'Collapse one level (double-click: all)',
21
+ expandLevel: 'Expand one level',
22
+ expandLevelHint: 'Expand one level (double-click: all)',
23
+ importFile: 'Import file',
24
+ new: 'New',
25
+ newFile: 'New file',
26
+ newSpace: 'New Space',
27
+ sync: {
28
+ synced: 'Synced',
29
+ unpushed: 'awaiting push',
30
+ unpushedHint: 'commit(s) not yet pushed to remote — will sync automatically',
31
+ conflicts: 'conflicts',
32
+ conflictsHint: 'file(s) have merge conflicts — open Settings > Sync to resolve',
33
+ syncError: 'Sync error',
34
+ syncOff: 'Sync off',
35
+ syncing: 'Syncing...',
36
+ syncNow: 'Sync now',
37
+ syncDone: 'Sync complete',
38
+ syncFailed: 'Sync failed',
39
+ syncRestored: 'Sync restored',
40
+ enableSync: 'Enable sync',
41
+ enableHint: 'Set up cross-device sync',
42
+ },
43
+ },
44
+ search: {
45
+ placeholder: 'Search files...',
46
+ noResults: 'No results found',
47
+ prompt: 'Type to search across all files',
48
+ navigate: 'navigate',
49
+ open: 'open',
50
+ close: 'close',
51
+ tabSearch: 'Search',
52
+ tabActions: 'Actions',
53
+ openSettings: 'Open Settings',
54
+ restartWalkthrough: 'Restart Walkthrough',
55
+ toggleDarkMode: 'Toggle Dark Mode',
56
+ goToAgents: 'Go to Agents',
57
+ goToDiscover: 'Go to Discover',
58
+ goToHelp: 'Go to Help',
59
+ walkthroughRestarted: 'Walkthrough restarted',
60
+ },
61
+ shortcutPanel: {
62
+ title: 'Keyboard Shortcuts',
63
+ navigation: 'Navigation',
64
+ panelsSection: 'Panels',
65
+ editor: 'Editor',
66
+ toggleSearch: 'Toggle Search',
67
+ toggleAskAI: 'Toggle Ask AI',
68
+ openSettings: 'Open Settings',
69
+ keyboardShortcuts: 'Keyboard Shortcuts',
70
+ closePanel: 'Close panel / Exit maximize',
71
+ saveFile: 'Save file',
72
+ undo: 'Undo',
73
+ redo: 'Redo',
74
+ toggleHint: 'to toggle this panel',
75
+ },
76
+ } as const;
77
+
78
+ export const navigationZh = {
79
+ sidebar: {
80
+ files: '空间',
81
+ search: '搜索',
82
+ searchTitle: '搜索',
83
+ askTitle: 'MindOS Agent',
84
+ settingsTitle: '设置',
85
+ plugins: '插件',
86
+ agents: '智能体',
87
+ echo: '回响',
88
+ discover: '探索',
89
+ history: '历史',
90
+ help: '帮助',
91
+ syncLabel: '同步',
92
+ collapseTitle: '收起侧栏',
93
+ expandTitle: '展开侧栏',
94
+ collapseLevel: '折叠一级',
95
+ collapseLevelHint: '折叠一级(双击:全部折叠)',
96
+ expandLevel: '展开一级',
97
+ expandLevelHint: '展开一级(双击:全部展开)',
98
+ importFile: '导入文件',
99
+ new: '新建',
100
+ newFile: '新建文件',
101
+ newSpace: '新建空间',
102
+ sync: {
103
+ synced: '已同步',
104
+ unpushed: '待推送',
105
+ unpushedHint: '个提交尚未推送到远程 — 将自动同步',
106
+ conflicts: '冲突',
107
+ conflictsHint: '个文件存在合并冲突 — 前往 设置 > 同步 解决',
108
+ syncError: '同步出错',
109
+ syncOff: '同步关闭',
110
+ syncing: '同步中...',
111
+ syncNow: '立即同步',
112
+ syncDone: '同步完成',
113
+ syncFailed: '同步失败',
114
+ syncRestored: '同步已恢复',
115
+ enableSync: '启用同步',
116
+ enableHint: '设置跨设备同步',
117
+ },
118
+ },
119
+ search: {
120
+ placeholder: '搜索文件...',
121
+ noResults: '没有找到结果',
122
+ prompt: '输入关键词搜索所有文件',
123
+ navigate: '上下导航',
124
+ open: '打开',
125
+ close: '关闭',
126
+ tabSearch: '搜索',
127
+ tabActions: '快捷操作',
128
+ openSettings: '打开设置',
129
+ restartWalkthrough: '重新开始引导',
130
+ toggleDarkMode: '切换深色模式',
131
+ goToAgents: '前往 Agents',
132
+ goToDiscover: '前往探索',
133
+ goToHelp: '前往帮助',
134
+ walkthroughRestarted: '引导已重置',
135
+ },
136
+ shortcutPanel: {
137
+ title: '快捷键',
138
+ navigation: '导航',
139
+ panelsSection: '面板',
140
+ editor: '编辑器',
141
+ toggleSearch: '切换搜索',
142
+ toggleAskAI: '切换 Ask AI',
143
+ openSettings: '打开设置',
144
+ keyboardShortcuts: '快捷键',
145
+ closePanel: '关闭面板 / 退出最大化',
146
+ saveFile: '保存文件',
147
+ undo: '撤销',
148
+ redo: '重做',
149
+ toggleHint: '切换此面板',
150
+ },
151
+ };