@geminilight/mindos 0.6.58 → 0.6.59
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.
- package/_standalone/.mindos-build-version +1 -1
- package/_standalone/.next/BUILD_ID +1 -1
- package/_standalone/.next/app-path-routes-manifest.json +24 -24
- package/_standalone/.next/build-manifest.json +3 -3
- package/_standalone/.next/cache/.previewinfo +1 -1
- package/_standalone/.next/cache/.rscinfo +1 -1
- package/_standalone/.next/cache/config.json +3 -3
- package/_standalone/.next/prerender-manifest.json +3 -3
- package/_standalone/.next/react-loadable-manifest.json +1 -1
- package/_standalone/.next/server/app/.well-known/agent-card.json/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/_global-error.html +2 -2
- package/_standalone/.next/server/app/_global-error.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/_standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/_standalone/.next/server/app/_not-found/page.js +1 -1
- package/_standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/[agentKey]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/agents/page.js +2 -2
- package/_standalone/.next/server/app/agents/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/agents/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/delegations/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/discover/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/a2a/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/config/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/registry/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/acp/session/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agent-activity/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agents/custom/detect/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/agents/custom/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask/route.js +3 -3
- package/_standalone/.next/server/app/api/ask/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/ask-sessions/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/auth/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/backlinks/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/changes/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/export/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/extract-pdf/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/import/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/raw/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/graph/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/health/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/agents/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/install-skill/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/mcp/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/recent-files/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/search/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/list-models/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/reset-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/settings/test-key/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-path/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/check-port/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/generate-token/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/ls/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/setup/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/skills/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/sync/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/tree-version/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/uninstall/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-check/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/update-status/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/workflows/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/changes/page.js +2 -2
- package/_standalone/.next/server/app/changes/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/changes/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page.js +3 -3
- package/_standalone/.next/server/app/echo/[segment]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/[segment]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/echo/page.js +1 -1
- package/_standalone/.next/server/app/echo/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/echo/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/explore/page.js +2 -2
- package/_standalone/.next/server/app/explore/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/explore/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/help/page.js +2 -2
- package/_standalone/.next/server/app/help/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/help/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/inbox/history/page.js +1 -1
- package/_standalone/.next/server/app/inbox/history/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/inbox/history/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/login/page.js +2 -2
- package/_standalone/.next/server/app/login/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/page.js +2 -8
- package/_standalone/.next/server/app/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/setup/page.js +2 -2
- package/_standalone/.next/server/app/setup/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/setup/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/trash/page.js +3 -3
- package/_standalone/.next/server/app/trash/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/trash/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/view/[...path]/page.js +3 -3
- package/_standalone/.next/server/app/view/[...path]/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/view/[...path]/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/wiki/page.js +2 -2
- package/_standalone/.next/server/app/wiki/page.js.nft.json +1 -1
- package/_standalone/.next/server/app/wiki/page_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app-paths-manifest.json +24 -24
- package/_standalone/.next/server/chunks/3484.js +1 -1
- package/_standalone/.next/server/chunks/530.js +65 -66
- package/_standalone/.next/server/chunks/{6793.js → 8343.js} +2 -2
- package/_standalone/.next/server/chunks/9787.js +2 -0
- package/_standalone/.next/server/middleware-build-manifest.js +1 -1
- package/_standalone/.next/server/middleware-react-loadable-manifest.js +1 -1
- package/_standalone/.next/server/pages/500.html +2 -2
- package/_standalone/.next/server/server-reference-manifest.js +1 -1
- package/_standalone/.next/server/server-reference-manifest.json +1 -1
- package/_standalone/.next/static/chunks/{1814.a7c127b2c73d1f70.js → 1814.a79b84d37df75c43.js} +1 -1
- package/_standalone/.next/static/chunks/3427-2e61a5df1f5e55fb.js +1 -0
- package/_standalone/.next/static/chunks/{1053-fe009233cff06e72.js → 5581-dac72e9f16e5ea29.js} +3 -3
- package/_standalone/.next/static/chunks/6297-085daa21037d5f81.js +1 -0
- package/_standalone/.next/static/chunks/{7249-fa98ca10e9a10f39.js → 7249-6cf8f2b78718c59e.js} +1 -1
- package/_standalone/.next/static/chunks/8520-56ec9ff087c15204.js +22 -0
- package/_standalone/.next/static/chunks/9905-a19d379cb225246e.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/{page-7bdeab5af8e4f5f2.js → page-35ea6de1af2be3b5.js} +1 -1
- package/_standalone/.next/static/chunks/app/agents/page-b172ea3743adb047.js +1 -0
- package/_standalone/.next/static/chunks/app/changes/{page-5a72144d1080a699.js → page-6d2f49651c0061f7.js} +1 -1
- package/_standalone/.next/static/chunks/app/echo/[segment]/page-84b95256f6e38aae.js +11 -0
- package/_standalone/.next/static/chunks/app/explore/{page-d3d99308146c2240.js → page-d9f58000bc445360.js} +2 -2
- package/_standalone/.next/static/chunks/app/help/{page-222df603080b5fab.js → page-f8cb806371b3175f.js} +1 -1
- package/_standalone/.next/static/chunks/app/inbox/history/{page-07819cf95cb0805f.js → page-26e71fb6f716a4c4.js} +1 -1
- package/_standalone/.next/static/chunks/app/layout-b89b0d955f39a753.js +164 -0
- package/_standalone/.next/static/chunks/app/login/{page-0eeef685052869a6.js → page-18fb00d568cd1f0e.js} +1 -1
- package/_standalone/.next/static/chunks/app/page-a8e6f085f38388bf.js +1 -0
- package/_standalone/.next/static/chunks/app/setup/{page-99fcfc460fa29733.js → page-821714e7477be46c.js} +1 -1
- package/_standalone/.next/static/chunks/app/trash/{page-54cbd5c98d9de69b.js → page-f92b728b78ac0f7e.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/{not-found-fc04c2bd4f35bc6f.js → not-found-6e0c75ad26ce8572.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-f87f4901b5e1a88f.js +12 -0
- package/_standalone/.next/static/chunks/app/wiki/page-641edb1f3cff2f93.js +1 -0
- package/_standalone/.next/static/chunks/{webpack-2c19436659aa657b.js → webpack-72e8d9e9073fd1f9.js} +1 -1
- package/_standalone/.next/static/css/6c104b118d3bc9b7.css +1 -0
- package/_standalone/.next/trace +64 -64
- package/_standalone/app/globals.css +2 -1
- package/_standalone/components/AskFab.tsx +4 -4
- package/_standalone/components/AskModal.tsx +1 -1
- package/_standalone/components/GuideCard.tsx +101 -152
- package/_standalone/components/RightAskPanel.tsx +2 -2
- package/_standalone/components/ask/AskContent.tsx +90 -51
- package/_standalone/components/ask/AskHeader.tsx +218 -18
- package/_standalone/components/ask/MessageList.tsx +66 -47
- package/_standalone/components/ask/SessionHistory.tsx +86 -60
- package/_standalone/components/ask/SessionTabBar.tsx +29 -21
- package/_standalone/components/ask/ThinkingBlock.tsx +6 -5
- package/_standalone/components/ask/ToolCallBlock.tsx +10 -9
- package/_standalone/components/settings/SettingsContent.tsx +1 -1
- package/_standalone/data/skills/mindos/SKILL.md +67 -15
- package/_standalone/data/skills/mindos-zh/SKILL.md +67 -11
- package/_standalone/hooks/useAskSession.ts +23 -1
- package/_standalone/lib/stores/locale-store.ts +20 -6
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/globals.css +2 -1
- package/app/app/layout.tsx +16 -4
- package/app/components/AskFab.tsx +4 -4
- package/app/components/AskModal.tsx +1 -1
- package/app/components/GuideCard.tsx +101 -152
- package/app/components/HomeContent.tsx +116 -575
- package/app/components/RightAskPanel.tsx +2 -2
- package/app/components/WikiHomeContent.tsx +151 -3
- package/app/components/ask/AskContent.tsx +90 -51
- package/app/components/ask/AskHeader.tsx +218 -18
- package/app/components/ask/MessageList.tsx +66 -47
- package/app/components/ask/SessionHistory.tsx +86 -60
- package/app/components/ask/SessionTabBar.tsx +29 -21
- package/app/components/ask/ThinkingBlock.tsx +6 -5
- package/app/components/ask/ToolCallBlock.tsx +10 -9
- package/app/components/settings/SettingsContent.tsx +1 -1
- package/app/data/skills/mindos/SKILL.md +67 -15
- package/app/data/skills/mindos-zh/SKILL.md +67 -11
- package/app/hooks/useAskSession.ts +23 -1
- package/app/lib/i18n/modules/ai-chat.ts +97 -10
- package/app/lib/i18n/modules/onboarding.ts +12 -12
- package/app/lib/stores/LocaleStoreInit.tsx +24 -1
- package/app/lib/stores/locale-store.ts +20 -6
- package/app/lib/types.ts +1 -0
- package/package.json +1 -1
- package/skills/mindos/SKILL.md +67 -15
- package/skills/mindos/references/knowledge-health.md +120 -0
- package/skills/mindos-max/SKILL.md +52 -5
- package/skills/mindos-max-zh/SKILL.md +55 -6
- package/skills/mindos-zh/SKILL.md +67 -11
- package/_standalone/.next/server/chunks/2364.js +0 -2
- package/_standalone/.next/server/chunks/357.js +0 -1
- package/_standalone/.next/static/chunks/178-105779afb62d36d9.js +0 -1
- package/_standalone/.next/static/chunks/2218-d54538000574ffef.js +0 -1
- package/_standalone/.next/static/chunks/2549-e63cf57fa927a41d.js +0 -1
- package/_standalone/.next/static/chunks/9274-296ab35f9f09e42e.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/page-5d1446665ddb3801.js +0 -1
- package/_standalone/.next/static/chunks/app/echo/[segment]/page-b0103509ce34444b.js +0 -11
- package/_standalone/.next/static/chunks/app/layout-7e02ddf4144b01f1.js +0 -186
- package/_standalone/.next/static/chunks/app/page-6a6a12bd6d6812d0.js +0 -7
- package/_standalone/.next/static/chunks/app/view/[...path]/page-ca7bdcbf27f88a46.js +0 -12
- package/_standalone/.next/static/chunks/app/wiki/page-d492256a93f0b8bc.js +0 -1
- package/_standalone/.next/static/css/fd84c8316ead16eb.css +0 -1
- /package/_standalone/.next/static/{2ksXveDzEcnCMRIElDkLq → u8p6oIRTcr_ns-ElNZ9rl}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{2ksXveDzEcnCMRIElDkLq → u8p6oIRTcr_ns-ElNZ9rl}/_ssgManifest.js +0 -0
|
@@ -227,6 +227,20 @@ export function useAskSession(currentFile?: string) {
|
|
|
227
227
|
});
|
|
228
228
|
}, []);
|
|
229
229
|
|
|
230
|
+
/** Toggle pin/unpin a session. Pinned sessions sort to top. */
|
|
231
|
+
const togglePinSession = useCallback((id: string) => {
|
|
232
|
+
setSessions((prev) => {
|
|
233
|
+
const idx = prev.findIndex((s) => s.id === id);
|
|
234
|
+
if (idx < 0) return prev;
|
|
235
|
+
const updated = { ...prev[idx], pinned: !prev[idx].pinned };
|
|
236
|
+
const next = [...prev];
|
|
237
|
+
next[idx] = updated;
|
|
238
|
+
// Only persist if session has messages
|
|
239
|
+
if (updated.messages.length > 0) void upsertSession(updated);
|
|
240
|
+
return next;
|
|
241
|
+
});
|
|
242
|
+
}, []);
|
|
243
|
+
|
|
230
244
|
const clearAllSessions = useCallback(() => {
|
|
231
245
|
// Only delete sessions that have messages (were persisted)
|
|
232
246
|
const persistedIds = sessions.filter(s => s.messages.length > 0).map(s => s.id);
|
|
@@ -239,10 +253,17 @@ export function useAskSession(currentFile?: string) {
|
|
|
239
253
|
// No upsertSession — memory only
|
|
240
254
|
}, [currentFile, sessions]);
|
|
241
255
|
|
|
256
|
+
/** Sessions sorted: pinned first, then by updatedAt desc */
|
|
257
|
+
const sortedSessions = [...sessions].sort((a, b) => {
|
|
258
|
+
if (a.pinned && !b.pinned) return -1;
|
|
259
|
+
if (!a.pinned && b.pinned) return 1;
|
|
260
|
+
return b.updatedAt - a.updatedAt;
|
|
261
|
+
});
|
|
262
|
+
|
|
242
263
|
return {
|
|
243
264
|
messages,
|
|
244
265
|
setMessages,
|
|
245
|
-
sessions,
|
|
266
|
+
sessions: sortedSessions,
|
|
246
267
|
activeSessionId,
|
|
247
268
|
initSessions,
|
|
248
269
|
persistSession,
|
|
@@ -251,6 +272,7 @@ export function useAskSession(currentFile?: string) {
|
|
|
251
272
|
loadSession,
|
|
252
273
|
deleteSession,
|
|
253
274
|
renameSession,
|
|
275
|
+
togglePinSession,
|
|
254
276
|
clearAllSessions,
|
|
255
277
|
};
|
|
256
278
|
}
|
|
@@ -6,7 +6,12 @@ export const aiChatEn = {
|
|
|
6
6
|
fabLabel: 'Ask AI',
|
|
7
7
|
placeholder: 'Ask a question... @ files, / skills',
|
|
8
8
|
emptyPrompt: 'How can I help?',
|
|
9
|
-
emptyHint: 'Type @ to reference files · / to use skills',
|
|
9
|
+
emptyHint: 'Type @ to reference files · / to use skills · drag images',
|
|
10
|
+
executingTool: 'Executing tool…',
|
|
11
|
+
toolRunning: 'Running...',
|
|
12
|
+
copyMessage: 'Copy',
|
|
13
|
+
toolInput: 'Input',
|
|
14
|
+
toolOutput: 'Output',
|
|
10
15
|
send: 'send',
|
|
11
16
|
newlineHint: 'new line',
|
|
12
17
|
panelComposerResize: 'Drag up to enlarge the input area',
|
|
@@ -36,10 +41,49 @@ export const aiChatEn = {
|
|
|
36
41
|
proxyCompatAlsoFailed: (err: string) => `Compatibility mode also failed: ${err}. Please check your Base URL, API key, and model name.`,
|
|
37
42
|
retry: 'Retry',
|
|
38
43
|
suggestions: [
|
|
39
|
-
'
|
|
40
|
-
'
|
|
41
|
-
'
|
|
42
|
-
'
|
|
44
|
+
{ label: 'Organize inbox', prompt: 'Organize my inbox files into the right spaces' },
|
|
45
|
+
{ label: 'Research a topic', prompt: 'Research the latest trends in AI agents' },
|
|
46
|
+
{ label: 'Draft weekly review', prompt: 'Draft a weekly review based on my recent notes' },
|
|
47
|
+
{ label: 'Brainstorm ideas', prompt: 'Brainstorm 3 creative ideas for my next project' },
|
|
48
|
+
],
|
|
49
|
+
/** Categorized prompts for homepage explore section */
|
|
50
|
+
homeCategories: [
|
|
51
|
+
{
|
|
52
|
+
label: 'Knowledge',
|
|
53
|
+
items: [
|
|
54
|
+
{ label: 'Organize into Spaces', desc: 'Sort scattered notes by topic', prompt: 'Help me organize my recent unstructured notes into appropriate spaces with proper tags' },
|
|
55
|
+
{ label: 'Sync & Deduplicate', desc: 'Clean up cross-platform overlap', prompt: 'Find duplicate or overlapping content across my spaces and help me consolidate them' },
|
|
56
|
+
{ label: 'Auto-tag & Categorize', desc: 'Add structure to raw notes', prompt: 'Review my untagged notes and suggest categories and tags for each' },
|
|
57
|
+
{ label: 'Weekly Digest', desc: 'Summarize this week\'s changes', prompt: 'Summarize everything I added or changed this week across all spaces' },
|
|
58
|
+
],
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
label: 'Writing',
|
|
62
|
+
items: [
|
|
63
|
+
{ label: 'Blog from Notes', desc: 'Turn drafts into polished posts', prompt: 'Turn my draft notes into a polished blog post with clear structure' },
|
|
64
|
+
{ label: 'Product Copy', desc: 'Landing page & descriptions', prompt: 'Write compelling product description and landing page copy based on my notes' },
|
|
65
|
+
{ label: 'Polish & Refine', desc: 'Improve clarity and tone', prompt: 'Review this document for clarity, tone, and structure, then rewrite the weak parts' },
|
|
66
|
+
{ label: 'Slide Deck Outline', desc: 'Presentation structure from notes', prompt: 'Create a slide deck outline from my notes on this topic' },
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
label: 'Analysis',
|
|
71
|
+
items: [
|
|
72
|
+
{ label: 'Competitive Overview', desc: 'Compare products & differentiators', prompt: 'Compare the products in my research notes and identify key differentiators' },
|
|
73
|
+
{ label: 'Extract Insights', desc: 'Patterns across reading notes', prompt: 'What are the most important insights and patterns across my reading notes?' },
|
|
74
|
+
{ label: 'Decision Framework', desc: 'Pros, cons, recommendation', prompt: 'Help me structure this decision with pros, cons, risks, and a recommendation' },
|
|
75
|
+
{ label: 'GTM Strategy', desc: 'Go-to-market from research', prompt: 'Help me build a go-to-market plan based on my product and market research notes' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Innovation',
|
|
80
|
+
items: [
|
|
81
|
+
{ label: 'Challenge My Assumptions', desc: 'Find blind spots in my thinking', prompt: 'Review my notes and challenge the key assumptions I\'m making. What am I missing?' },
|
|
82
|
+
{ label: 'What If Scenarios', desc: 'Explore alternative futures', prompt: 'Based on my research, generate 3 contrarian "what if" scenarios I haven\'t considered' },
|
|
83
|
+
{ label: 'Combine & Remix Ideas', desc: 'Cross-pollinate across domains', prompt: 'Find unexpected connections between ideas in different spaces and suggest novel combinations' },
|
|
84
|
+
{ label: 'Spot the Opportunity', desc: 'Gaps others are missing', prompt: 'Analyze my market research notes and identify underserved niches or emerging opportunities' },
|
|
85
|
+
],
|
|
86
|
+
},
|
|
43
87
|
],
|
|
44
88
|
modeChat: 'Chat',
|
|
45
89
|
modeAgent: 'Agent',
|
|
@@ -145,7 +189,12 @@ export const aiChatZh = {
|
|
|
145
189
|
fabLabel: 'AI 助手',
|
|
146
190
|
placeholder: '输入问题… @ 附加文件,/ 技能',
|
|
147
191
|
emptyPrompt: '有什么可以帮你?',
|
|
148
|
-
emptyHint: '输入 @ 引用文件 · / 使用技能',
|
|
192
|
+
emptyHint: '输入 @ 引用文件 · / 使用技能 · 拖拽图片',
|
|
193
|
+
executingTool: '正在执行工具…',
|
|
194
|
+
toolRunning: '运行中...',
|
|
195
|
+
copyMessage: '复制',
|
|
196
|
+
toolInput: '输入',
|
|
197
|
+
toolOutput: '输出',
|
|
149
198
|
send: '发送',
|
|
150
199
|
newlineHint: '换行',
|
|
151
200
|
panelComposerResize: '向上拖拽以拉高输入区',
|
|
@@ -175,10 +224,48 @@ export const aiChatZh = {
|
|
|
175
224
|
proxyCompatAlsoFailed: (err: string) => `兼容模式也失败了:${err}。请检查 Base URL、API Key 和模型名称。`,
|
|
176
225
|
retry: '重试',
|
|
177
226
|
suggestions: [
|
|
178
|
-
'
|
|
179
|
-
'
|
|
180
|
-
'
|
|
181
|
-
'
|
|
227
|
+
{ label: '整理收件箱', prompt: '把收件箱的文件整理到对应空间' },
|
|
228
|
+
{ label: '调研一个话题', prompt: '调研一下 AI Agent 的最新趋势' },
|
|
229
|
+
{ label: '起草周报', prompt: '根据最近的笔记起草一份周报' },
|
|
230
|
+
{ label: '想新 idea', prompt: '为我的下一个项目想 3 个新 idea' },
|
|
231
|
+
],
|
|
232
|
+
homeCategories: [
|
|
233
|
+
{
|
|
234
|
+
label: '知识管理',
|
|
235
|
+
items: [
|
|
236
|
+
{ label: '整理到 Space', desc: '按主题归类零散笔记', prompt: '帮我把最近的零散笔记整理到合适的 Space,并打好标签' },
|
|
237
|
+
{ label: '同步去重', desc: '清理跨平台重复内容', prompt: '找出我各个 Space 中重复或重叠的内容,帮我合并整理' },
|
|
238
|
+
{ label: '自动打标签', desc: '给未分类笔记加结构', prompt: '检查我未标记的笔记,建议合适的分类和标签' },
|
|
239
|
+
{ label: '每周摘要', desc: '汇总本周变更', prompt: '总结我这周在所有 Space 中新增和修改的内容' },
|
|
240
|
+
],
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
label: '内容创作',
|
|
244
|
+
items: [
|
|
245
|
+
{ label: '笔记变博客', desc: '草稿变成精修文章', prompt: '把我的草稿笔记改写成一篇结构清晰的博客文章' },
|
|
246
|
+
{ label: '产品文案', desc: '落地页与产品描述', prompt: '根据我的笔记写一段有吸引力的产品描述和落地页文案' },
|
|
247
|
+
{ label: '润色优化', desc: '提升清晰度和语气', prompt: '审阅这篇文档的清晰度、语气和结构,重写不好的部分' },
|
|
248
|
+
{ label: '演示大纲', desc: '从笔记生成演讲结构', prompt: '根据我关于这个主题的笔记,创建一个演示文稿大纲' },
|
|
249
|
+
],
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
label: '分析洞察',
|
|
253
|
+
items: [
|
|
254
|
+
{ label: '竞品对比', desc: '比较产品差异化', prompt: '对比我调研笔记中的产品,找出关键差异点' },
|
|
255
|
+
{ label: '提炼洞察', desc: '发现阅读笔记中的规律', prompt: '我的阅读笔记中有哪些最重要的见解和规律?' },
|
|
256
|
+
{ label: '决策框架', desc: '利弊分析与建议', prompt: '帮我用利弊、风险和建议来结构化这个决策' },
|
|
257
|
+
{ label: 'GTM 策略', desc: '从调研到上市方案', prompt: '根据我的产品和市场调研笔记,帮我制定一份上市计划' },
|
|
258
|
+
],
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
label: '启发创新',
|
|
262
|
+
items: [
|
|
263
|
+
{ label: '挑战假设', desc: '找出思维盲点', prompt: '审视我的笔记,挑战我正在做的关键假设。我遗漏了什么?' },
|
|
264
|
+
{ label: '反常识探索', desc: '探索替代可能性', prompt: '根据我的调研,生成 3 个我没考虑过的反常识场景' },
|
|
265
|
+
{ label: '跨域融合', desc: '不同领域的创意碰撞', prompt: '在我不同 Space 的想法中找到意想不到的联系,并建议新颖的组合' },
|
|
266
|
+
{ label: '发现机会', desc: '别人没看到的空白', prompt: '分析我的市场调研笔记,找出未被充分服务的小众市场或新兴机会' },
|
|
267
|
+
],
|
|
268
|
+
},
|
|
182
269
|
],
|
|
183
270
|
modeChat: '对话',
|
|
184
271
|
modeAgent: 'Agent',
|
|
@@ -174,17 +174,17 @@ export const onboardingEn = {
|
|
|
174
174
|
button: 'Import Files',
|
|
175
175
|
},
|
|
176
176
|
ai: {
|
|
177
|
-
title: '
|
|
177
|
+
title: 'Save with AI',
|
|
178
178
|
cta: 'Try it',
|
|
179
|
-
desc: '
|
|
180
|
-
prompt: '
|
|
179
|
+
desc: 'Ask MindOS Agent to capture knowledge from this conversation into your KB:',
|
|
180
|
+
prompt: 'Help me distill the key takeaways from our conversation into a reusable SOP in my knowledge base.',
|
|
181
181
|
promptEmpty: 'Help me design a knowledge base folder structure that fits my needs',
|
|
182
182
|
},
|
|
183
183
|
agent: {
|
|
184
|
-
title: '
|
|
184
|
+
title: 'Connect other Agents',
|
|
185
185
|
cta: 'Copy prompt',
|
|
186
|
-
desc: 'Open Cursor, Claude Code, or any
|
|
187
|
-
copyPrompt: '
|
|
186
|
+
desc: 'Open Cursor, Claude Code, or any Agent with MindOS CLI and paste:',
|
|
187
|
+
copyPrompt: 'Summarize what we discussed and save it to my MindOS knowledge base as a reusable SOP.',
|
|
188
188
|
copy: 'Copy',
|
|
189
189
|
copied: 'Copied!',
|
|
190
190
|
},
|
|
@@ -396,17 +396,17 @@ export const onboardingZh = {
|
|
|
396
396
|
button: '导入文件',
|
|
397
397
|
},
|
|
398
398
|
ai: {
|
|
399
|
-
title: '
|
|
399
|
+
title: 'AI 帮你沉淀',
|
|
400
400
|
cta: '试试',
|
|
401
|
-
desc: '
|
|
402
|
-
prompt: '
|
|
401
|
+
desc: '让 MindOS Agent 把对话中的经验沉淀到知识库:',
|
|
402
|
+
prompt: '帮我把这次对话的关键收获整理成一份可复用的 SOP,存到我的知识库里。',
|
|
403
403
|
promptEmpty: '帮我设计一个适合我的知识库目录结构',
|
|
404
404
|
},
|
|
405
405
|
agent: {
|
|
406
|
-
title: '
|
|
406
|
+
title: '连接其他 Agent',
|
|
407
407
|
cta: '复制提示词',
|
|
408
|
-
desc: '打开 Cursor、Claude Code
|
|
409
|
-
copyPrompt: '
|
|
408
|
+
desc: '打开 Cursor、Claude Code 或任意 MCP Agent,粘贴以下提示词,让知识流入 MindOS:',
|
|
409
|
+
copyPrompt: '把我们刚才讨论的内容总结一下,存到我的 MindOS 知识库里,形成可复用的 SOP。',
|
|
410
410
|
copy: '复制',
|
|
411
411
|
copied: '已复制!',
|
|
412
412
|
},
|
|
@@ -1,14 +1,37 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { useEffect } from 'react';
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
4
|
import { useLocaleStore } from '@/lib/stores/locale-store';
|
|
5
5
|
import type { Locale } from '@/lib/i18n';
|
|
6
|
+
import { messages } from '@/lib/i18n';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Initializes locale store with SSR value and attaches event listeners.
|
|
9
10
|
* Renders nothing. Place once near the root.
|
|
11
|
+
*
|
|
12
|
+
* During the first client render, synchronously updates the Zustand store
|
|
13
|
+
* to match ssrLocale (from server cookie). This ensures the first client
|
|
14
|
+
* render produces identical HTML to the server, preventing hydration mismatch.
|
|
15
|
+
* After hydration, _init() reconciles with localStorage/navigator for
|
|
16
|
+
* the true client preference.
|
|
10
17
|
*/
|
|
11
18
|
export default function LocaleStoreInit({ ssrLocale }: { ssrLocale: Locale }) {
|
|
19
|
+
const didSync = useRef(false);
|
|
20
|
+
|
|
21
|
+
// Synchronous store update during first render — before React commits.
|
|
22
|
+
// The store defaults to 'en'; if ssrLocale is 'zh' (from cookie), update
|
|
23
|
+
// immediately so all sibling/child components read 'zh' in the same pass.
|
|
24
|
+
if (!didSync.current) {
|
|
25
|
+
didSync.current = true;
|
|
26
|
+
const state = useLocaleStore.getState();
|
|
27
|
+
if (state.locale !== ssrLocale) {
|
|
28
|
+
useLocaleStore.setState({
|
|
29
|
+
locale: ssrLocale,
|
|
30
|
+
t: messages[ssrLocale] as unknown as typeof state.t,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
12
35
|
useEffect(() => {
|
|
13
36
|
const cleanup = useLocaleStore.getState()._init(ssrLocale);
|
|
14
37
|
return cleanup;
|
|
@@ -22,23 +22,37 @@ function getLocaleSnapshot(): Locale {
|
|
|
22
22
|
return navigator.language.startsWith('zh') ? 'zh' : 'en';
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Read the locale that the inline <script> in layout.tsx already resolved.
|
|
27
|
+
* Returns 'en' to match SSR default — the LocaleStoreInit component
|
|
28
|
+
* reconciles to the real locale synchronously before first commit.
|
|
29
|
+
*/
|
|
30
|
+
function getPreHydrateLocale(): Locale {
|
|
31
|
+
return 'en';
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const initialLocale = getPreHydrateLocale();
|
|
35
|
+
|
|
25
36
|
export const useLocaleStore = create<LocaleStoreState>((set) => ({
|
|
26
|
-
locale:
|
|
27
|
-
t: messages[
|
|
37
|
+
locale: initialLocale,
|
|
38
|
+
t: messages[initialLocale] as unknown as Messages,
|
|
28
39
|
|
|
29
40
|
setLocale: (l: Locale) => {
|
|
30
41
|
document.cookie = `locale=${l};path=/;max-age=31536000;SameSite=Lax`;
|
|
31
42
|
document.documentElement.lang = l === 'zh' ? 'zh' : 'en';
|
|
43
|
+
(window as any).__mindos_locale__ = l;
|
|
32
44
|
set({ locale: l, t: messages[l] as unknown as Messages });
|
|
33
45
|
window.dispatchEvent(new Event('mindos-locale-change'));
|
|
34
46
|
},
|
|
35
47
|
|
|
36
48
|
_init: (ssrLocale: Locale) => {
|
|
37
|
-
//
|
|
38
|
-
const clientLocale =
|
|
39
|
-
|
|
49
|
+
// Reconcile: if client localStorage disagrees with current store, update once
|
|
50
|
+
const clientLocale = getLocaleSnapshot();
|
|
51
|
+
const current = useLocaleStore.getState().locale;
|
|
52
|
+
if (clientLocale !== current) {
|
|
53
|
+
set({ locale: clientLocale, t: messages[clientLocale] as unknown as Messages });
|
|
54
|
+
}
|
|
40
55
|
|
|
41
|
-
// Listen for external changes (e.g. localStorage change in another tab, or pre-hydration script)
|
|
42
56
|
const handler = () => {
|
|
43
57
|
const l = getLocaleSnapshot();
|
|
44
58
|
set({ locale: l, t: messages[l] as unknown as Messages });
|
package/app/lib/types.ts
CHANGED
package/package.json
CHANGED
package/skills/mindos/SKILL.md
CHANGED
|
@@ -1,26 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mindos
|
|
3
3
|
description: >
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
distill experience, sync related docs.
|
|
4
|
+
The user's shared knowledge base — persistent across sessions and agents. MindOS stores decisions,
|
|
5
|
+
meeting notes, SOPs, debugging lessons, architecture choices, research findings, and preferences.
|
|
7
6
|
更新笔记, 搜索知识库, 整理文件, 执行SOP/工作流, 复盘, 追加CSV, 跨Agent交接,
|
|
8
7
|
路由非结构化输入到对应文件, 提炼经验, 同步关联文档.
|
|
9
8
|
NOT for editing app source, project docs, or paths outside the KB.
|
|
10
9
|
Core concepts: Space, Instruction (INSTRUCTION.md), Skill (SKILL.md); notes can embody both.
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
|
|
11
|
+
Trigger on: save or record anything, search for prior notes or context, update or edit a file,
|
|
12
|
+
organize notes, run a workflow or SOP, capture decisions, append rows to a table or CSV,
|
|
13
|
+
hand off context to another agent, check if something was discussed before, look up a past
|
|
14
|
+
decision, distill lessons learned, prepare context for a meeting, quick-capture to staging area,
|
|
15
|
+
organize inbox, check knowledge health, detect conflicts or contradictions, find stale content.
|
|
16
|
+
Chinese triggers: 帮我记下来, 搜一下笔记, 更新知识库, 整理文件, 复盘, 提炼经验,
|
|
17
|
+
保存, 记录, 交接, 查一下之前的, 有没有相关笔记, 把这个存起来, 放到暂存台,
|
|
18
|
+
整理暂存台, 知识健康检查, 检测知识冲突.
|
|
19
|
+
|
|
20
|
+
Proactive behavior — do not wait for the user to mention MindOS:
|
|
21
|
+
(1) When user's question implies stored context may exist (past decisions, previous discussions,
|
|
22
|
+
meeting records) → search MindOS first, even if they don't explicitly mention it.
|
|
23
|
+
(2) After completing valuable work (bug fixed, decision made, lesson learned, architecture chosen,
|
|
24
|
+
meeting summarized) → offer to save it to MindOS for future reference.
|
|
25
|
+
(3) After a long or multi-topic conversation → suggest persisting key decisions and context.
|
|
19
26
|
---
|
|
20
27
|
|
|
21
28
|
# MindOS Skill
|
|
22
29
|
|
|
23
|
-
<!-- version: 3.
|
|
30
|
+
<!-- version: 3.2.0 — CLI-first, MCP optional -->
|
|
24
31
|
|
|
25
32
|
## CLI commands
|
|
26
33
|
|
|
@@ -85,6 +92,7 @@ npm install -g @geminilight/mindos
|
|
|
85
92
|
- **Space** — Knowledge partitions organized the way you think. Agents follow the same structure.
|
|
86
93
|
- **Instruction** — A rules file (`INSTRUCTION.md`) all connected agents obey.
|
|
87
94
|
- **Skill** — Teaches agents how to read, write, and organize the KB.
|
|
95
|
+
- **Inbox** — The `Inbox/` directory is a staging area for quick capture. Files land here when there's no obvious home yet. They get organized later — by the user manually or via AI-assisted batch organization.
|
|
88
96
|
|
|
89
97
|
Notes can embody both Instruction and Skill — they're just Markdown files in the tree.
|
|
90
98
|
|
|
@@ -99,9 +107,13 @@ User request
|
|
|
99
107
|
│ └─ [Read-only]: search → read → answer with citations. No writes.
|
|
100
108
|
│
|
|
101
109
|
├─ Save / record / update / organize specific content?
|
|
102
|
-
│ ├─
|
|
110
|
+
│ ├─ Know where it goes → [Single-file edit]
|
|
111
|
+
│ ├─ Don't know where it goes → [Inbox path] — save to Inbox/, classify later
|
|
103
112
|
│ └─ Multiple files or unclear → [Multi-file routing] — plan first
|
|
104
113
|
│
|
|
114
|
+
├─ Organize inbox / classify staged files?
|
|
115
|
+
│ └─ [Inbox organize] — read Inbox/ files, propose destinations, move after approval
|
|
116
|
+
│
|
|
105
117
|
├─ Structural change (rename / move / delete / reorganize)?
|
|
106
118
|
│ └─ [Structural path] — check backlinks before and after
|
|
107
119
|
│
|
|
@@ -111,6 +123,9 @@ User request
|
|
|
111
123
|
├─ Retrospective / distill / handoff?
|
|
112
124
|
│ └─ [Retrospective path]
|
|
113
125
|
│
|
|
126
|
+
├─ Knowledge health check / detect conflicts?
|
|
127
|
+
│ └─ [Health check path] — read references/knowledge-health.md
|
|
128
|
+
│
|
|
114
129
|
└─ Ambiguous?
|
|
115
130
|
└─ ASK. Propose 2-3 specific options based on KB state.
|
|
116
131
|
```
|
|
@@ -125,8 +140,9 @@ User request
|
|
|
125
140
|
- "organize" → ask: display only, or write back?
|
|
126
141
|
|
|
127
142
|
**File location uncertainty:**
|
|
128
|
-
- Can't decide in 5 seconds →
|
|
129
|
-
- "Just put it somewhere" →
|
|
143
|
+
- Can't decide in 5 seconds → save to `Inbox/`, inform user, propose classification later
|
|
144
|
+
- "Just put it somewhere" / "先放着" → save to `Inbox/`
|
|
145
|
+
- User drags files or pastes unstructured content without specifying location → `Inbox/`
|
|
130
146
|
|
|
131
147
|
**Scope creep:**
|
|
132
148
|
- Input routes to >5 files → pause, confirm scope
|
|
@@ -159,6 +175,42 @@ When user expresses a standing preference → read [references/preference-captur
|
|
|
159
175
|
|
|
160
176
|
When creating/rewriting an SOP → read [references/sop-template.md](./references/sop-template.md).
|
|
161
177
|
|
|
178
|
+
## Inbox (staging area)
|
|
179
|
+
|
|
180
|
+
The `Inbox/` directory is the KB's quick-capture zone. It has its own `INSTRUCTION.md` that governs behavior.
|
|
181
|
+
|
|
182
|
+
**When to use Inbox:**
|
|
183
|
+
- User says "just save it" / "先放着" / "放到暂存台" without specifying a location
|
|
184
|
+
- Content doesn't clearly fit any existing Space or directory
|
|
185
|
+
- Batch import of multiple files that need individual classification
|
|
186
|
+
|
|
187
|
+
**How to save to Inbox:**
|
|
188
|
+
```bash
|
|
189
|
+
mindos file create "Inbox/<filename>.md" --content "..."
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**How to organize Inbox:**
|
|
193
|
+
1. List Inbox files: `mindos file list Inbox/`
|
|
194
|
+
2. Read each file to understand its content
|
|
195
|
+
3. For each file, propose the best destination directory based on KB structure
|
|
196
|
+
4. Present the full routing plan to user for approval
|
|
197
|
+
5. Move files: `mindos file rename "Inbox/<file>" "<target-dir>/<file>"`
|
|
198
|
+
6. After moving, check if the target directory's README needs updating
|
|
199
|
+
|
|
200
|
+
**Aging reminder:** Files in Inbox older than 7 days are considered "aging". If you notice aging files during bootstrap, mention it: "You have N files in Inbox that have been sitting there for over a week. Want me to help organize them?"
|
|
201
|
+
|
|
202
|
+
## Knowledge health check
|
|
203
|
+
|
|
204
|
+
When user asks to check knowledge health, detect conflicts, audit quality, or says "知识健康检查" / "检测冲突" → read [references/knowledge-health.md](./references/knowledge-health.md) for the full procedure.
|
|
205
|
+
|
|
206
|
+
Quick summary of what gets checked:
|
|
207
|
+
- **Contradictions**: conflicting facts across files on the same topic
|
|
208
|
+
- **Broken links**: references to files that no longer exist
|
|
209
|
+
- **Stale content**: files with outdated date markers or untouched for >6 months
|
|
210
|
+
- **Duplicates**: two files covering the same ground without cross-referencing
|
|
211
|
+
- **Orphan files**: files with zero backlinks, hard to discover
|
|
212
|
+
- **Structural issues**: wrong directory, missing READMEs, aging Inbox files
|
|
213
|
+
|
|
162
214
|
---
|
|
163
215
|
|
|
164
216
|
## Error handling (CLI)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Knowledge Health Check
|
|
2
|
+
|
|
3
|
+
When the user asks to check KB health, detect conflicts, or audit knowledge quality, follow this guide.
|
|
4
|
+
|
|
5
|
+
## Dimensions
|
|
6
|
+
|
|
7
|
+
### 1. Contradictions / Conflicts
|
|
8
|
+
|
|
9
|
+
Two or more files state conflicting facts about the same topic (e.g., one says "rate limit = 100/min", another says "rate limit = 200/min" without distinguishing context).
|
|
10
|
+
|
|
11
|
+
**Detection procedure:**
|
|
12
|
+
1. Identify the topic scope (user may specify, or scan recent edits)
|
|
13
|
+
2. Search for all files related to the topic (2-4 keyword variants)
|
|
14
|
+
3. Read each hit and extract key claims/decisions
|
|
15
|
+
4. Compare claims across files — flag any pair that contradicts
|
|
16
|
+
5. Present conflicts to user with file paths and quotes
|
|
17
|
+
|
|
18
|
+
**Resolution:** Ask user which version is authoritative. Update or annotate the non-authoritative file to reference the correct source. Never silently overwrite.
|
|
19
|
+
|
|
20
|
+
### 2. Orphan References
|
|
21
|
+
|
|
22
|
+
A file links to another file that no longer exists (broken `[[link]]` or markdown link).
|
|
23
|
+
|
|
24
|
+
**Detection procedure:**
|
|
25
|
+
1. List all files in KB
|
|
26
|
+
2. For each file, extract all internal links (markdown links, wiki-links)
|
|
27
|
+
3. Check if each link target exists
|
|
28
|
+
4. Report broken links with source file path and line
|
|
29
|
+
|
|
30
|
+
**Resolution:** Either remove the dead link, or recreate the missing file if the content is recoverable from git history.
|
|
31
|
+
|
|
32
|
+
### 3. Stale / Outdated Content
|
|
33
|
+
|
|
34
|
+
Files with explicit date markers (e.g., "Last verified: 2025-01-15") that are significantly old, or files whose topic has clearly evolved but the file hasn't been updated.
|
|
35
|
+
|
|
36
|
+
**Detection procedure:**
|
|
37
|
+
1. Search for date markers: "Last verified", "Last updated", "截止日期", "更新时间"
|
|
38
|
+
2. Flag any file where the marker date is >90 days old
|
|
39
|
+
3. Also check `mindos file history <path>` — files untouched for >6 months with active topics are suspects
|
|
40
|
+
|
|
41
|
+
**Resolution:** Present the list to user. For each stale file, ask: still accurate? update? archive?
|
|
42
|
+
|
|
43
|
+
### 4. Duplicate Content
|
|
44
|
+
|
|
45
|
+
Two files covering the same topic with substantial overlap, neither referencing the other.
|
|
46
|
+
|
|
47
|
+
**Detection procedure:**
|
|
48
|
+
1. Search for the topic from multiple angles
|
|
49
|
+
2. If two files return as top results for the same query, read both
|
|
50
|
+
3. Compare: are they covering the same ground? Is one a superset of the other?
|
|
51
|
+
4. Flag duplicates with a similarity summary
|
|
52
|
+
|
|
53
|
+
**Resolution:** Merge into one authoritative file. Convert the other into a redirect/link. Never delete without confirmation.
|
|
54
|
+
|
|
55
|
+
### 5. Orphan Files
|
|
56
|
+
|
|
57
|
+
Files that no other file references — isolated knowledge that may be hard to discover.
|
|
58
|
+
|
|
59
|
+
**Detection procedure:**
|
|
60
|
+
1. For each file, run `mindos file backlinks <path>`
|
|
61
|
+
2. Files with zero backlinks AND not in a well-indexed directory (no README listing them) are orphan candidates
|
|
62
|
+
3. Exclude governance files (INSTRUCTION.md, README.md) and root-level files
|
|
63
|
+
|
|
64
|
+
**Resolution:** Suggest adding links from relevant parent documents or READMEs.
|
|
65
|
+
|
|
66
|
+
### 6. Structural Issues
|
|
67
|
+
|
|
68
|
+
- Files in wrong directories (content doesn't match the directory's topic)
|
|
69
|
+
- Inbox files that have been sitting >7 days (aging)
|
|
70
|
+
- Missing READMEs in directories with >3 files
|
|
71
|
+
- Inconsistent naming conventions within a directory
|
|
72
|
+
|
|
73
|
+
**Detection procedure:**
|
|
74
|
+
1. Bootstrap the KB tree
|
|
75
|
+
2. For each directory: check if README exists, read a sample of files to verify topic consistency
|
|
76
|
+
3. Check Inbox for aging files (>7 days)
|
|
77
|
+
4. Spot-check naming patterns per directory
|
|
78
|
+
|
|
79
|
+
## Health Report Format
|
|
80
|
+
|
|
81
|
+
Present findings as a structured report:
|
|
82
|
+
|
|
83
|
+
```markdown
|
|
84
|
+
# Knowledge Health Report — {date}
|
|
85
|
+
|
|
86
|
+
## Summary
|
|
87
|
+
- Contradictions found: N
|
|
88
|
+
- Broken links: N
|
|
89
|
+
- Stale files (>90 days): N
|
|
90
|
+
- Duplicates suspected: N
|
|
91
|
+
- Orphan files: N
|
|
92
|
+
- Structural issues: N
|
|
93
|
+
- **Overall health: {Good / Needs Attention / Critical}**
|
|
94
|
+
|
|
95
|
+
## Contradictions
|
|
96
|
+
1. `file-a.md` vs `file-b.md` — {description}
|
|
97
|
+
...
|
|
98
|
+
|
|
99
|
+
## Broken Links
|
|
100
|
+
1. `source.md` line N → `missing-target.md` (not found)
|
|
101
|
+
...
|
|
102
|
+
|
|
103
|
+
## Stale Content
|
|
104
|
+
1. `old-file.md` — Last updated: {date}, {N} days ago
|
|
105
|
+
...
|
|
106
|
+
|
|
107
|
+
(... other sections ...)
|
|
108
|
+
|
|
109
|
+
## Recommended Actions
|
|
110
|
+
1. {Highest priority fix}
|
|
111
|
+
2. ...
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Scope Control
|
|
115
|
+
|
|
116
|
+
- **Quick check**: User says "check health" / "快速检查" → Run dimensions 1-3 only (contradictions, orphan refs, stale)
|
|
117
|
+
- **Full audit**: User says "full audit" / "全面审计" → Run all 6 dimensions
|
|
118
|
+
- **Targeted check**: User specifies a topic or directory → Scope to that area only
|
|
119
|
+
|
|
120
|
+
Always confirm scope with user before starting a full audit on large KBs.
|