@geminilight/mindos 0.6.34 → 0.6.36
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/.env.local.example +2 -2
- package/_standalone/.mindos-build-version +1 -1
- package/_standalone/.next/BUILD_ID +1 -1
- package/_standalone/.next/app-path-routes-manifest.json +15 -15
- package/_standalone/.next/build-manifest.json +2 -2
- 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/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 +1 -1
- 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/ask/route.js +5 -5
- 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.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.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/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.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/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/monitoring/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/recent-files/route.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.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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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/login/page.js +1 -1
- 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 +1 -1
- 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_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/view/[...path]/page.js +2 -2
- 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-paths-manifest.json +15 -15
- package/_standalone/.next/server/chunks/4931.js +27 -27
- package/_standalone/.next/server/chunks/6539.js +1 -1
- package/_standalone/.next/server/chunks/7670.js +1 -1
- package/_standalone/.next/server/chunks/{1225.js → 9360.js} +2 -2
- 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/{1263-31c1efe3fd8f3f99.js → 1263-79beb8734dee7bbd.js} +2 -2
- package/_standalone/.next/static/chunks/app/{layout-1ad561312a9a5b5b.js → layout-d0f6dc4d3e6f0be4.js} +11 -11
- package/_standalone/.next/static/chunks/app/{page-e2a6e96831efa703.js → page-404b0bfb5721b7f8.js} +2 -2
- package/_standalone/.next/static/chunks/app/setup/page-01ab1f549d636057.js +1 -0
- package/_standalone/.next/static/chunks/app/trash/{page-c6e9de9ca4ab4bf7.js → page-a79804c1df44d3cc.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/{page-ff57a587c3f5490e.js → page-d3aceca36a1a9eb2.js} +2 -2
- package/_standalone/.next/trace +53 -53
- package/_standalone/components/SyncStatusBar.tsx +1 -1
- package/_standalone/components/TableOfContents.tsx +7 -0
- package/_standalone/components/setup/StepAI.tsx +66 -3
- package/_standalone/components/setup/StepDots.tsx +18 -10
- package/_standalone/components/setup/StepKB.tsx +26 -0
- package/_standalone/components/setup/constants.tsx +4 -3
- package/_standalone/data/skills/mindos/SKILL.md +4 -22
- package/_standalone/data/skills/mindos-zh/SKILL.md +2 -20
- package/_standalone/lib/agent/context.ts +29 -20
- package/_standalone/lib/i18n/modules/onboarding.ts +14 -6
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/api/ask/route.ts +77 -24
- package/app/app/api/bootstrap/route.ts +4 -0
- package/app/app/api/export/route.ts +5 -0
- package/app/app/api/git/route.ts +2 -1
- package/app/app/api/recent-files/route.ts +3 -2
- package/app/app/api/setup/route.ts +1 -0
- package/app/components/SyncStatusBar.tsx +1 -1
- package/app/components/TableOfContents.tsx +7 -0
- package/app/components/setup/StepAI.tsx +66 -3
- package/app/components/setup/StepDots.tsx +18 -10
- package/app/components/setup/StepKB.tsx +26 -0
- package/app/components/setup/constants.tsx +4 -3
- package/app/components/setup/index.tsx +22 -32
- package/app/data/skills/mindos/SKILL.md +4 -22
- package/app/data/skills/mindos-zh/SKILL.md +2 -20
- package/app/lib/acp/subprocess.ts +3 -2
- package/app/lib/agent/context.ts +29 -20
- package/app/lib/fs.ts +77 -0
- package/app/lib/i18n/modules/onboarding.ts +14 -6
- package/app/lib/settings.ts +6 -0
- package/bin/cli.js +14 -4
- package/bin/lib/stop.js +5 -2
- package/package.json +6 -2
- package/scripts/setup.js +16 -0
- package/skills/mindos/SKILL.md +4 -22
- package/skills/mindos/references/write-supplement.md +35 -0
- package/skills/mindos-zh/SKILL.md +2 -20
- package/skills/mindos-zh/references/README.md +2 -1
- package/skills/mindos-zh/references/write-supplement.md +35 -0
- package/_standalone/.next/static/chunks/app/setup/page-f8a85accc3be554f.js +0 -1
- /package/_standalone/.next/static/{K1Y12u2jxCR7efUgJVpyl → VWZDVb8DL1Pbykh9EOj_Y}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{K1Y12u2jxCR7efUgJVpyl → VWZDVb8DL1Pbykh9EOj_Y}/_ssgManifest.js +0 -0
|
@@ -183,7 +183,7 @@ export default function SyncStatusBar({ collapsed, onOpenSyncSettings }: SyncSta
|
|
|
183
183
|
const currentLevel = getStatusLevel(status, false);
|
|
184
184
|
const prev = prevLevelRef.current;
|
|
185
185
|
if (prev !== currentLevel) {
|
|
186
|
-
const syncT =
|
|
186
|
+
const syncT = t.sidebar?.sync;
|
|
187
187
|
// Recovery: was error/conflicts, now synced
|
|
188
188
|
if ((prev === 'error' || prev === 'conflicts') && currentLevel === 'synced') {
|
|
189
189
|
setToast(syncT?.syncRestored ?? 'Sync restored');
|
|
@@ -14,7 +14,14 @@ function parseHeadings(content: string): Heading[] {
|
|
|
14
14
|
const slugger = new GithubSlugger();
|
|
15
15
|
const lines = content.split('\n');
|
|
16
16
|
const headings: Heading[] = [];
|
|
17
|
+
let inCodeBlock = false;
|
|
17
18
|
for (const line of lines) {
|
|
19
|
+
// Toggle code fence state (``` or ~~~, with optional language tag)
|
|
20
|
+
if (/^(`{3,}|~{3,})/.test(line)) {
|
|
21
|
+
inCodeBlock = !inCodeBlock;
|
|
22
|
+
continue;
|
|
23
|
+
}
|
|
24
|
+
if (inCodeBlock) continue;
|
|
18
25
|
const match = line.match(/^(#{1,4})\s+(.+)/);
|
|
19
26
|
if (match) {
|
|
20
27
|
const level = match[1].length;
|
|
@@ -1,16 +1,35 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useState, useEffect } from 'react';
|
|
4
|
+
import { Brain, Zap, SkipForward, CheckCircle2, ChevronDown, ChevronRight, Copy } from 'lucide-react';
|
|
4
5
|
import { Field, Input, ApiKeyInput } from '@/components/settings/Primitives';
|
|
5
|
-
import type { SetupState, SetupMessages } from './types';
|
|
6
|
+
import type { SetupState, SetupMessages, PortStatus } from './types';
|
|
7
|
+
import StepPorts from './StepPorts';
|
|
6
8
|
|
|
7
9
|
export interface StepAIProps {
|
|
8
10
|
state: SetupState;
|
|
9
11
|
update: <K extends keyof SetupState>(key: K, val: SetupState[K]) => void;
|
|
10
12
|
s: SetupMessages;
|
|
13
|
+
onCopyToken: () => void;
|
|
14
|
+
// Port props (embedded in Advanced section)
|
|
15
|
+
webPortStatus: PortStatus;
|
|
16
|
+
mcpPortStatus: PortStatus;
|
|
17
|
+
setWebPortStatus: (s: PortStatus) => void;
|
|
18
|
+
setMcpPortStatus: (s: PortStatus) => void;
|
|
19
|
+
checkPort: (port: number, which: 'web' | 'mcp') => void;
|
|
20
|
+
portConflict: boolean;
|
|
11
21
|
}
|
|
12
22
|
|
|
13
|
-
export default function StepAI({ state, update, s }: StepAIProps) {
|
|
23
|
+
export default function StepAI({ state, update, s, onCopyToken, webPortStatus, mcpPortStatus, setWebPortStatus, setMcpPortStatus, checkPort, portConflict }: StepAIProps) {
|
|
24
|
+
const [portsOpen, setPortsOpen] = useState(false);
|
|
25
|
+
|
|
26
|
+
// Auto-expand Advanced section if port check finds a problem
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
if (!portsOpen && (webPortStatus.available === false || mcpPortStatus.available === false || portConflict)) {
|
|
29
|
+
setPortsOpen(true);
|
|
30
|
+
}
|
|
31
|
+
}, [webPortStatus.available, mcpPortStatus.available, portConflict, portsOpen]);
|
|
32
|
+
|
|
14
33
|
const providers = [
|
|
15
34
|
{ id: 'anthropic' as const, icon: <Brain size={18} />, label: 'Anthropic', desc: 'Claude — claude-sonnet-4-6' },
|
|
16
35
|
{ id: 'openai' as const, icon: <Zap size={18} />, label: 'OpenAI', desc: 'GPT or any OpenAI-compatible API' },
|
|
@@ -70,6 +89,50 @@ export default function StepAI({ state, update, s }: StepAIProps) {
|
|
|
70
89
|
)}
|
|
71
90
|
</div>
|
|
72
91
|
)}
|
|
92
|
+
|
|
93
|
+
{/* Advanced: Port Settings (collapsed) */}
|
|
94
|
+
<div className="pt-3 mt-1" style={{ borderTop: '1px solid var(--border)' }}>
|
|
95
|
+
<button
|
|
96
|
+
type="button"
|
|
97
|
+
onClick={() => setPortsOpen(!portsOpen)}
|
|
98
|
+
className="flex items-center gap-1.5 text-xs font-medium"
|
|
99
|
+
style={{ color: 'var(--muted-foreground)' }}>
|
|
100
|
+
{portsOpen ? <ChevronDown size={12} /> : <ChevronRight size={12} />}
|
|
101
|
+
{s.advancedPorts}
|
|
102
|
+
</button>
|
|
103
|
+
{portsOpen && (
|
|
104
|
+
<div className="mt-3 space-y-5">
|
|
105
|
+
{/* MCP Auth Token (read-only) */}
|
|
106
|
+
<div className="space-y-1.5">
|
|
107
|
+
<p className="text-xs font-medium" style={{ color: 'var(--foreground)' }}>
|
|
108
|
+
🔑 {s.tokenSectionTitle}
|
|
109
|
+
</p>
|
|
110
|
+
<div className="flex items-center gap-2">
|
|
111
|
+
<code className="flex-1 truncate text-xs font-mono px-3 py-2 rounded-lg"
|
|
112
|
+
style={{ background: 'var(--muted)', color: 'var(--foreground)' }}>
|
|
113
|
+
{state.authToken}
|
|
114
|
+
</code>
|
|
115
|
+
<button type="button" onClick={onCopyToken}
|
|
116
|
+
className="flex items-center gap-1 px-2.5 py-2 text-xs rounded-lg border transition-colors hover:bg-muted shrink-0"
|
|
117
|
+
style={{ borderColor: 'var(--border)', color: 'var(--foreground)' }}>
|
|
118
|
+
<Copy size={12} /> {s.copyToken}
|
|
119
|
+
</button>
|
|
120
|
+
</div>
|
|
121
|
+
<p className="text-xs" style={{ color: 'var(--muted-foreground)' }}>
|
|
122
|
+
{s.tokenSectionHint}
|
|
123
|
+
</p>
|
|
124
|
+
</div>
|
|
125
|
+
|
|
126
|
+
{/* Port Settings */}
|
|
127
|
+
<StepPorts
|
|
128
|
+
state={state} update={update}
|
|
129
|
+
webPortStatus={webPortStatus} mcpPortStatus={mcpPortStatus}
|
|
130
|
+
setWebPortStatus={setWebPortStatus} setMcpPortStatus={setMcpPortStatus}
|
|
131
|
+
checkPort={checkPort} portConflict={portConflict} s={s}
|
|
132
|
+
/>
|
|
133
|
+
</div>
|
|
134
|
+
)}
|
|
135
|
+
</div>
|
|
73
136
|
</div>
|
|
74
137
|
);
|
|
75
138
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { CheckCircle2 } from 'lucide-react';
|
|
3
4
|
import { useLocale } from '@/lib/LocaleContext';
|
|
4
5
|
|
|
5
6
|
export interface StepDotsProps {
|
|
@@ -7,32 +8,39 @@ export interface StepDotsProps {
|
|
|
7
8
|
setStep: (s: number) => void;
|
|
8
9
|
stepTitles: readonly string[];
|
|
9
10
|
disabled?: boolean;
|
|
11
|
+
/** Number of "numbered" steps to show (Confirm step is not numbered) */
|
|
12
|
+
numberedSteps?: number;
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
export default function StepDots({ step, setStep, stepTitles, disabled }: StepDotsProps) {
|
|
15
|
+
export default function StepDots({ step, setStep, stepTitles, disabled, numberedSteps }: StepDotsProps) {
|
|
13
16
|
const { t } = useLocale();
|
|
17
|
+
const count = numberedSteps ?? stepTitles.length;
|
|
18
|
+
// Only render dots for numbered steps (exclude Confirm)
|
|
19
|
+
const dotsToShow = stepTitles.slice(0, count);
|
|
20
|
+
const isConfirmStep = step >= count;
|
|
21
|
+
|
|
14
22
|
return (
|
|
15
23
|
<div className="flex items-center gap-2 mb-8" role="navigation" aria-label="Setup steps">
|
|
16
|
-
{
|
|
24
|
+
{dotsToShow.map((title: string, i: number) => (
|
|
17
25
|
<div key={i} className="flex items-center gap-2">
|
|
18
|
-
{i > 0 && <div className="w-8 h-px" style={{ background: i <= step ? 'var(--amber)' : 'var(--border)' }} />}
|
|
26
|
+
{i > 0 && <div className="w-8 h-px" style={{ background: i <= step || isConfirmStep ? 'var(--amber)' : 'var(--border)' }} />}
|
|
19
27
|
<button onClick={() => setStep(i)}
|
|
20
28
|
aria-current={i === step ? 'step' : undefined}
|
|
21
29
|
aria-label={title}
|
|
22
30
|
className="flex flex-col items-center gap-1 p-1 -m-1 disabled:cursor-not-allowed disabled:opacity-60"
|
|
23
|
-
disabled={disabled || i
|
|
24
|
-
title={(disabled || i
|
|
31
|
+
disabled={disabled || i > step}
|
|
32
|
+
title={(disabled || i > step) ? t.hints.cannotJumpForward : undefined}>
|
|
25
33
|
<div
|
|
26
34
|
className="w-6 h-6 rounded-full text-xs font-medium flex items-center justify-center transition-colors"
|
|
27
35
|
style={{
|
|
28
|
-
background: i
|
|
29
|
-
color: i <= step ? 'var(--amber-foreground)' : 'var(--muted-foreground)',
|
|
30
|
-
opacity: i <= step ? 1 : 0.5,
|
|
36
|
+
background: (i < step || isConfirmStep) ? 'var(--amber)' : i === step ? 'var(--amber)' : 'var(--muted)',
|
|
37
|
+
color: (i <= step || isConfirmStep) ? 'var(--amber-foreground)' : 'var(--muted-foreground)',
|
|
38
|
+
opacity: (i <= step || isConfirmStep) ? 1 : 0.5,
|
|
31
39
|
}}>
|
|
32
|
-
{i + 1}
|
|
40
|
+
{(i < step || isConfirmStep) ? <CheckCircle2 size={14} /> : i + 1}
|
|
33
41
|
</div>
|
|
34
42
|
<span className="text-[10px] leading-tight hidden sm:inline max-w-[4rem] text-center truncate"
|
|
35
|
-
style={{ color: i === step ? 'var(--foreground)' : 'var(--muted-foreground)', opacity: i <= step ? 1 : 0.5 }}>
|
|
43
|
+
style={{ color: (i === step && !isConfirmStep) ? 'var(--foreground)' : 'var(--muted-foreground)', opacity: (i <= step || isConfirmStep) ? 1 : 0.5 }}>
|
|
36
44
|
{title}
|
|
37
45
|
</span>
|
|
38
46
|
</button>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
|
+
import { AlertCircle } from 'lucide-react';
|
|
4
5
|
import { Field } from '@/components/settings/Primitives';
|
|
5
6
|
import type { Messages } from '@/lib/i18n';
|
|
6
7
|
import type { SetupState } from './types';
|
|
@@ -26,6 +27,7 @@ export interface StepKBProps {
|
|
|
26
27
|
|
|
27
28
|
export default function StepKB({ state, update, t, homeDir }: StepKBProps) {
|
|
28
29
|
const s = t.setup;
|
|
30
|
+
const [passwordTouched, setPasswordTouched] = useState(false);
|
|
29
31
|
// Build platform-aware placeholder, e.g. /Users/alice/MindOS/mind or C:\Users\alice\MindOS\mind
|
|
30
32
|
// Windows homedir always contains \, e.g. C:\Users\Alice — safe to detect by separator
|
|
31
33
|
const sep = homeDir.includes('\\') ? '\\' : '/';
|
|
@@ -232,6 +234,30 @@ export default function StepKB({ state, update, t, homeDir }: StepKBProps) {
|
|
|
232
234
|
</div>
|
|
233
235
|
</div>
|
|
234
236
|
)}
|
|
237
|
+
|
|
238
|
+
{/* ── Security ── */}
|
|
239
|
+
<div className="pt-2 mt-2" style={{ borderTop: '1px solid var(--border)' }}>
|
|
240
|
+
<Field label={<>{s.webPassword} <span style={{ color: 'var(--error)' }}>*</span></>} hint={s.webPasswordHint}>
|
|
241
|
+
<input
|
|
242
|
+
type="password"
|
|
243
|
+
value={state.webPassword}
|
|
244
|
+
onChange={e => { update('webPassword', e.target.value); setPasswordTouched(true); }}
|
|
245
|
+
onBlur={() => setPasswordTouched(true)}
|
|
246
|
+
placeholder="••••••••"
|
|
247
|
+
className="w-full px-3 py-2 text-sm rounded-lg border outline-none transition-colors focus-visible:ring-1 focus-visible:ring-ring"
|
|
248
|
+
style={{
|
|
249
|
+
background: 'var(--input, var(--card))',
|
|
250
|
+
borderColor: passwordTouched && !state.webPassword.trim() ? 'var(--error)' : 'var(--border)',
|
|
251
|
+
color: 'var(--foreground)',
|
|
252
|
+
}}
|
|
253
|
+
/>
|
|
254
|
+
{passwordTouched && !state.webPassword.trim() && (
|
|
255
|
+
<p className="text-xs flex items-center gap-1 mt-1" style={{ color: 'var(--error)' }}>
|
|
256
|
+
<AlertCircle size={11} /> {s.webPasswordRequired}
|
|
257
|
+
</p>
|
|
258
|
+
)}
|
|
259
|
+
</Field>
|
|
260
|
+
</div>
|
|
235
261
|
</div>
|
|
236
262
|
);
|
|
237
263
|
}
|
|
@@ -7,7 +7,8 @@ export const TEMPLATES: Array<{ id: Template; icon: React.ReactNode; dirs: strin
|
|
|
7
7
|
{ id: 'empty', icon: <FileText size={18} />, dirs: ['README.md', 'CONFIG.json', 'INSTRUCTION.md'] },
|
|
8
8
|
];
|
|
9
9
|
|
|
10
|
-
export const TOTAL_STEPS =
|
|
10
|
+
export const TOTAL_STEPS = 4;
|
|
11
11
|
export const STEP_KB = 0;
|
|
12
|
-
export const
|
|
13
|
-
export const STEP_AGENTS =
|
|
12
|
+
export const STEP_AI = 1;
|
|
13
|
+
export const STEP_AGENTS = 2;
|
|
14
|
+
export const STEP_REVIEW = 3;
|
|
@@ -96,21 +96,12 @@ It covers: startup protocol, write tool selection, and step-by-step execution de
|
|
|
96
96
|
| List top-level Mind Spaces | `mindos_list_spaces` | Full `mindos_list_files` when you only need zone names and README blurbs |
|
|
97
97
|
| Find files | `mindos_search_notes` (2-4 parallel keyword variants) | Single-keyword search |
|
|
98
98
|
| Read content | `mindos_read_file` or `mindos_read_lines` (for large files) | Reading entire large file when you need 10 lines |
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
| Full file replacement | `mindos_write_file` | Using this when a section edit suffices |
|
|
102
|
-
| New file | `mindos_create_file` | Creates parent dirs but does NOT scaffold Space files |
|
|
103
|
-
| New Mind Space (zone + README + INSTRUCTION) | `mindos_create_space` | The only way to create a Space. `create_file` creates plain folders |
|
|
104
|
-
| Rename a Space directory | `mindos_rename_space` | `rename_file` (files only; does not rename folders) |
|
|
105
|
-
| Add CSV row | `mindos_append_csv` (validates header) | Manual string append without header check |
|
|
106
|
-
| Check impact before rename | `mindos_get_backlinks` | Renaming without checking references |
|
|
107
|
-
| Inspect recent changes | `mindos_get_recent` | Guessing what changed recently |
|
|
108
|
-
| Recover old version | `mindos_get_file_at_version` | Asking user to recall what was there |
|
|
99
|
+
|
|
100
|
+
Write, structural, and history tools → [references/write-supplement.md](./references/write-supplement.md).
|
|
109
101
|
|
|
110
102
|
### Fallbacks
|
|
111
103
|
|
|
112
104
|
- `mindos_bootstrap` unavailable → manual reads of root `INSTRUCTION.md` + `README.md`.
|
|
113
|
-
- Line/section tools unavailable → read + constrained `mindos_write_file` (simulate minimal edit).
|
|
114
105
|
- Search returns empty → don't give up: (1) scan tree in context, (2) read candidate files directly, (3) `mindos_list_files` on specific subdirectories, (4) try synonym/alternate-language keywords.
|
|
115
106
|
|
|
116
107
|
---
|
|
@@ -120,17 +111,8 @@ It covers: startup protocol, write tool selection, and step-by-step execution de
|
|
|
120
111
|
| Pattern | When | Key steps |
|
|
121
112
|
|---------|------|-----------|
|
|
122
113
|
| **Read-only Q&A** | Lookup / summarize / quote | Tree reasoning → search → read → answer with citations → state gaps |
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
| **Conversation retrospective** | Distill / capture session | Confirm scope → extract decisions/pitfalls/actions → route → trace changes |
|
|
126
|
-
| **SOP execution** | Repeatable procedure | Read SOP fully → execute stepwise → update stale sections → propose SOP update if diverged |
|
|
127
|
-
| **Structural change** | Rename / move / delete | `get_backlinks` → impact report → confirm → execute → update refs → sync READMEs |
|
|
128
|
-
| **CSV append** | Add row to a table | Read header → validate fields → `mindos_append_csv` |
|
|
129
|
-
| **Cross-agent handoff** | Continue another agent's work | Read task state + decisions → continue without re-discovery → write back progress |
|
|
130
|
-
| **Periodic review** | Summarize recent changes | `get_recent`/`get_history` → read changed files → structured summary |
|
|
131
|
-
| **Handoff doc** | Create a briefing | Read sources → synthesize (background, decisions, status, open items) → place in project dir |
|
|
132
|
-
|
|
133
|
-
For detailed execution steps on write patterns → [references/write-supplement.md](./references/write-supplement.md).
|
|
114
|
+
|
|
115
|
+
For write, SOP, structural, and handoff patterns → [references/write-supplement.md](./references/write-supplement.md).
|
|
134
116
|
|
|
135
117
|
---
|
|
136
118
|
|
|
@@ -95,21 +95,12 @@ description: >
|
|
|
95
95
|
| 列出顶层心智空间 | `mindos_list_spaces` | 只需分区概览却拉整棵 `list_files` |
|
|
96
96
|
| 找文件 | `mindos_search_notes`(2-4 条并行关键词变体)| 单关键词搜索 |
|
|
97
97
|
| 读内容 | `mindos_read_file` 或 `mindos_read_lines`(大文件) | 只需 10 行却读整文件 |
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
| 整文件替换 | `mindos_write_file` | 用它做章节级编辑 |
|
|
101
|
-
| 新建文件 | `mindos_create_file` | 自动创建父目录,但不会生成空间脚手架文件 |
|
|
102
|
-
| 新建心智空间(目录 + README + INSTRUCTION)| `mindos_create_space` | 创建空间的唯一方式。`create_file` 只创建普通目录 |
|
|
103
|
-
| 重命名空间目录 | `mindos_rename_space` | `rename_file`(仅文件,不能重命名文件夹)|
|
|
104
|
-
| 追加 CSV | `mindos_append_csv`(校验表头)| 手动拼字符串不校验 |
|
|
105
|
-
| 重命名前查影响 | `mindos_get_backlinks` | 不查引用就重命名 |
|
|
106
|
-
| 查看近期变动 | `mindos_get_recent` | 猜最近改了什么 |
|
|
107
|
-
| 恢复历史版本 | `mindos_get_file_at_version` | 让用户回忆之前内容 |
|
|
98
|
+
|
|
99
|
+
写入、结构变更、历史工具 → [references/write-supplement.md](./references/write-supplement.md)。
|
|
108
100
|
|
|
109
101
|
### 回退
|
|
110
102
|
|
|
111
103
|
- `mindos_bootstrap` 不可用 → 手动读根 `INSTRUCTION.md` + `README.md`。
|
|
112
|
-
- 行级/章节级工具不可用 → 读 + 受限 `mindos_write_file`(模拟最小修改)。
|
|
113
104
|
- 搜索无结果 → 不放弃:(1) 扫上下文中的树;(2) 直接读候选文件;(3) `mindos_list_files` 细化子目录;(4) 用同义词/中英文变体重试。
|
|
114
105
|
|
|
115
106
|
---
|
|
@@ -119,15 +110,6 @@ description: >
|
|
|
119
110
|
| 模式 | 适用场景 | 关键步骤 |
|
|
120
111
|
|------|----------|----------|
|
|
121
112
|
| **只读问答** | 查找 / 总结 / 引用 | 目录树推断 → 搜索 → 读取 → 标注来源 → 明确说信息缺口 |
|
|
122
|
-
| **单文件编辑** | 目标文件明确 | 启动协议 → 读目标 + 局部约定 → 最小修改 → 验证 → 总结 |
|
|
123
|
-
| **多文件路由** | 非结构化输入,多个目的地 | 解析为语义单元 → 路由表 → 确认 → 编辑 → 汇总 |
|
|
124
|
-
| **对话复盘** | 提炼 / 沉淀会话 | 确认范围 → 抽取决策/踩坑/下一步 → 路由 → 记录变更 |
|
|
125
|
-
| **SOP 执行** | 可重复流程 | 完整读 SOP → 分步执行 → 更新过时段落 → 偏差则提议更新 |
|
|
126
|
-
| **结构变更** | 重命名 / 移动 / 删除 | `get_backlinks` → 影响报告 → 确认 → 执行 → 更新引用 → 同步 README |
|
|
127
|
-
| **CSV 追加** | 追加表格行 | 读表头 → 校验字段 → `mindos_append_csv` |
|
|
128
|
-
| **跨 Agent 接力** | 继续其他 Agent 的工作 | 读任务状态+决策 → 无需重新探索直接接续 → 回写进度 |
|
|
129
|
-
| **周期性回顾** | 汇总近期变动 | `get_recent`/`get_history` → 读变动文件 → 结构化总结 |
|
|
130
|
-
| **交接文档** | 创建简报 | 读来源 → 合成(背景、决策、状态、待办)→ 放项目目录 |
|
|
131
113
|
|
|
132
114
|
写入模式详细执行步骤 → [references/write-supplement.md](./references/write-supplement.md)。
|
|
133
115
|
|
|
@@ -9,6 +9,15 @@ import type { AgentMessage } from '@mariozechner/pi-agent-core';
|
|
|
9
9
|
import type { ToolResultMessage, AssistantMessage, UserMessage } from '@mariozechner/pi-ai';
|
|
10
10
|
import { countCjkChars } from '@/lib/core/cjk';
|
|
11
11
|
|
|
12
|
+
const DEV = process.env.NODE_ENV === 'development';
|
|
13
|
+
|
|
14
|
+
// AgentMessage is opaque; cast to access role/content at runtime.
|
|
15
|
+
interface AgentMessageFields {
|
|
16
|
+
role: string;
|
|
17
|
+
content: string | Array<{ type: string; text?: string }>;
|
|
18
|
+
}
|
|
19
|
+
function asMsg(m: AgentMessage): AgentMessageFields { return m as unknown as AgentMessageFields; }
|
|
20
|
+
|
|
12
21
|
// ---------------------------------------------------------------------------
|
|
13
22
|
// Token estimation — CJK-aware (CJK ~1.5 tokens/char, ASCII ~0.25 tokens/char)
|
|
14
23
|
// ---------------------------------------------------------------------------
|
|
@@ -28,7 +37,7 @@ export function estimateStringTokens(text: string): number {
|
|
|
28
37
|
/** Rough token count for a single AgentMessage */
|
|
29
38
|
function messageTokens(msg: AgentMessage): number {
|
|
30
39
|
if ('content' in msg) {
|
|
31
|
-
const content = (msg
|
|
40
|
+
const content = asMsg(msg).content;
|
|
32
41
|
if (typeof content === 'string') return estimateStringTokens(content);
|
|
33
42
|
if (Array.isArray(content)) {
|
|
34
43
|
let tokens = 0;
|
|
@@ -121,11 +130,11 @@ export function truncateToolOutputs(messages: AgentMessage[]): AgentMessage[] {
|
|
|
121
130
|
// Find the index of the last 'toolResult' role message
|
|
122
131
|
let lastToolIdx = -1;
|
|
123
132
|
for (let i = messages.length - 1; i >= 0; i--) {
|
|
124
|
-
if ((messages[i]
|
|
133
|
+
if (asMsg(messages[i]).role === 'toolResult') { lastToolIdx = i; break; }
|
|
125
134
|
}
|
|
126
135
|
|
|
127
136
|
return messages.map((msg, idx) => {
|
|
128
|
-
const m = msg
|
|
137
|
+
const m = asMsg(msg);
|
|
129
138
|
if (m.role !== 'toolResult' || idx === lastToolIdx) return msg;
|
|
130
139
|
|
|
131
140
|
const toolMsg = m as ToolResultMessage;
|
|
@@ -160,7 +169,7 @@ Be concise and factual. Output only the summary, no preamble.`;
|
|
|
160
169
|
|
|
161
170
|
/** Extract a short text representation from an AgentMessage for summarization */
|
|
162
171
|
function messageToText(m: AgentMessage): string {
|
|
163
|
-
const msg = m
|
|
172
|
+
const msg = asMsg(m);
|
|
164
173
|
const role = msg.role;
|
|
165
174
|
let content = '';
|
|
166
175
|
|
|
@@ -202,7 +211,7 @@ export async function compactMessages(
|
|
|
202
211
|
// Adjust split point to avoid cutting between an assistant (with tool calls)
|
|
203
212
|
// and its tool result.
|
|
204
213
|
let splitIdx = messages.length - 6;
|
|
205
|
-
while (splitIdx > 0 && (messages[splitIdx]
|
|
214
|
+
while (splitIdx > 0 && asMsg(messages[splitIdx]).role === 'toolResult') {
|
|
206
215
|
splitIdx--;
|
|
207
216
|
}
|
|
208
217
|
if (splitIdx < 2) {
|
|
@@ -230,17 +239,17 @@ export async function compactMessages(
|
|
|
230
239
|
|
|
231
240
|
const summaryText = summaryMessage.content
|
|
232
241
|
.filter(p => p.type === 'text')
|
|
233
|
-
.map(p => (p as
|
|
242
|
+
.map(p => (p as { text?: string }).text)
|
|
234
243
|
.join('');
|
|
235
244
|
|
|
236
|
-
console.log(`[ask] Compacted ${earlyMessages.length} early messages into summary (${summaryText.length} chars)`);
|
|
245
|
+
if (DEV) console.log(`[ask] Compacted ${earlyMessages.length} early messages into summary (${summaryText.length} chars)`);
|
|
237
246
|
|
|
238
247
|
const summaryContent = `[System Note: Older conversation history has been truncated due to context length limits, but here is an AI-generated summary of what was discussed so far.]\n\n${summaryText}`;
|
|
239
248
|
|
|
240
249
|
// If first recent message is also 'user', merge summary into it to avoid
|
|
241
250
|
// consecutive user messages (Anthropic rejects user→user sequences).
|
|
242
|
-
if ((recentMessages[0]
|
|
243
|
-
const merged = { ...(recentMessages[0] as
|
|
251
|
+
if (asMsg(recentMessages[0])?.role === 'user') {
|
|
252
|
+
const merged = { ...asMsg(recentMessages[0]) } as AgentMessageFields;
|
|
244
253
|
if (typeof merged.content === 'string') {
|
|
245
254
|
merged.content = `${summaryContent}\n\n---\n\n${merged.content}`;
|
|
246
255
|
} else if (Array.isArray(merged.content)) {
|
|
@@ -270,7 +279,7 @@ export async function compactMessages(
|
|
|
270
279
|
console.warn('[ask] Compact failed, applying hard prune as fallback:', err);
|
|
271
280
|
const pruned = hardPrune(messages, systemPrompt, modelName);
|
|
272
281
|
if (pruned.length < messages.length) {
|
|
273
|
-
console.log(`[ask] Hard prune fallback succeeded (${messages.length} → ${pruned.length} messages)`);
|
|
282
|
+
if (DEV) console.log(`[ask] Hard prune fallback succeeded (${messages.length} → ${pruned.length} messages)`);
|
|
274
283
|
return { messages: pruned, compacted: false };
|
|
275
284
|
}
|
|
276
285
|
// If pruning also can't help, let it bubble up so request fails safely
|
|
@@ -307,28 +316,28 @@ export function hardPrune(
|
|
|
307
316
|
}
|
|
308
317
|
|
|
309
318
|
// Ensure we don't cut between an assistant (with tool calls) and its tool result.
|
|
310
|
-
while (cutIdx < messages.length - 1 && (messages[cutIdx]
|
|
319
|
+
while (cutIdx < messages.length - 1 && asMsg(messages[cutIdx]).role === 'toolResult') {
|
|
311
320
|
total -= messageTokens(messages[cutIdx]);
|
|
312
321
|
cutIdx++;
|
|
313
322
|
}
|
|
314
323
|
|
|
315
324
|
// Ensure first message is 'user' (Anthropic requirement)
|
|
316
|
-
while (cutIdx < messages.length - 1 && (messages[cutIdx]
|
|
325
|
+
while (cutIdx < messages.length - 1 && asMsg(messages[cutIdx]).role !== 'user') {
|
|
317
326
|
total -= messageTokens(messages[cutIdx]);
|
|
318
327
|
cutIdx++;
|
|
319
328
|
}
|
|
320
329
|
|
|
321
330
|
// Fallback: if no user message found in remaining messages, inject a synthetic one
|
|
322
331
|
const pruned = cutIdx > 0 ? messages.slice(cutIdx) : messages;
|
|
323
|
-
if (pruned.length > 0 && (pruned[0]
|
|
324
|
-
console.log(`[ask] Hard pruned ${cutIdx} messages, injecting synthetic user message (${messages.length} → ${pruned.length + 1})`);
|
|
332
|
+
if (pruned.length > 0 && asMsg(pruned[0]).role !== 'user') {
|
|
333
|
+
if (DEV) console.log(`[ask] Hard pruned ${cutIdx} messages, injecting synthetic user message (${messages.length} → ${pruned.length + 1})`);
|
|
325
334
|
const syntheticUser: UserMessage = {
|
|
326
335
|
role: 'user',
|
|
327
336
|
content: '[System Note: Older conversation history has been truncated due to context length limits. The user may refer to things you can no longer see. If so, kindly ask them to repeat the context.]',
|
|
328
337
|
timestamp: Date.now(),
|
|
329
338
|
};
|
|
330
339
|
return [syntheticUser as AgentMessage, ...pruned];
|
|
331
|
-
} else if (cutIdx > 0 && pruned.length > 0 && (pruned[0]
|
|
340
|
+
} else if (cutIdx > 0 && pruned.length > 0 && asMsg(pruned[0]).role === 'user') {
|
|
332
341
|
// If we pruned and the first message IS a user message, prepend the warning to it
|
|
333
342
|
const firstMsg = { ...pruned[0] } as UserMessage;
|
|
334
343
|
firstMsg.content = `[System Note: Older conversation history has been truncated due to context length limits. The user may refer to things you can no longer see. If so, kindly ask them to repeat the context.]\n\n` + firstMsg.content;
|
|
@@ -336,7 +345,7 @@ export function hardPrune(
|
|
|
336
345
|
}
|
|
337
346
|
|
|
338
347
|
if (cutIdx > 0) {
|
|
339
|
-
console.log(`[ask] Hard pruned ${cutIdx} messages (${messages.length} → ${messages.length - cutIdx})`);
|
|
348
|
+
if (DEV) console.log(`[ask] Hard pruned ${cutIdx} messages (${messages.length} → ${messages.length - cutIdx})`);
|
|
340
349
|
return pruned;
|
|
341
350
|
}
|
|
342
351
|
|
|
@@ -365,11 +374,11 @@ export function createTransformContext(
|
|
|
365
374
|
const preTokens = estimateTokens(result);
|
|
366
375
|
const sysTokens = estimateStringTokens(systemPrompt);
|
|
367
376
|
const ctxLimit = getContextLimit(modelName);
|
|
368
|
-
console.log(`[ask] Context: ~${preTokens + sysTokens} tokens (messages=${preTokens}, system=${sysTokens}), limit=${ctxLimit}`);
|
|
377
|
+
if (DEV) console.log(`[ask] Context: ~${preTokens + sysTokens} tokens (messages=${preTokens}, system=${sysTokens}), limit=${ctxLimit}`);
|
|
369
378
|
|
|
370
379
|
// 2. Compact if >70% context limit (skip if user disabled)
|
|
371
380
|
if (contextStrategy === 'auto' && needsCompact(result, systemPrompt, modelName)) {
|
|
372
|
-
console.log('[ask] Context >70% limit, compacting...');
|
|
381
|
+
if (DEV) console.log('[ask] Context >70% limit, compacting...');
|
|
373
382
|
const compactResult = await compactMessages(
|
|
374
383
|
result,
|
|
375
384
|
getCompactModel(),
|
|
@@ -380,9 +389,9 @@ export function createTransformContext(
|
|
|
380
389
|
result = compactResult.messages;
|
|
381
390
|
if (compactResult.compacted) {
|
|
382
391
|
const postTokens = estimateTokens(result);
|
|
383
|
-
console.log(`[ask] After compact: ~${postTokens + sysTokens} tokens`);
|
|
392
|
+
if (DEV) console.log(`[ask] After compact: ~${postTokens + sysTokens} tokens`);
|
|
384
393
|
} else {
|
|
385
|
-
console.log('[ask] Compact skipped (too few messages or fallback used), hard prune will handle overflow if needed');
|
|
394
|
+
if (DEV) console.log('[ask] Compact skipped (too few messages or fallback used), hard prune will handle overflow if needed');
|
|
386
395
|
}
|
|
387
396
|
}
|
|
388
397
|
|
|
@@ -15,7 +15,7 @@ export const onboardingEn = {
|
|
|
15
15
|
dismiss: 'Dismiss',
|
|
16
16
|
},
|
|
17
17
|
setup: {
|
|
18
|
-
stepTitles: ['Knowledge Base', 'AI
|
|
18
|
+
stepTitles: ['Knowledge Base', 'AI Configuration', 'Agent Tools', 'Confirm'],
|
|
19
19
|
// Step 1
|
|
20
20
|
kbPath: 'Knowledge base path',
|
|
21
21
|
kbPathHint: 'Absolute path to your notes directory.',
|
|
@@ -56,8 +56,12 @@ export const onboardingEn = {
|
|
|
56
56
|
generateToken: 'Generate',
|
|
57
57
|
copyToken: 'Copy',
|
|
58
58
|
copiedToken: 'Copied!',
|
|
59
|
-
webPassword: 'Web
|
|
60
|
-
webPasswordHint: '
|
|
59
|
+
webPassword: 'Web Password',
|
|
60
|
+
webPasswordHint: 'Protect your knowledge base from unauthorized browser access.',
|
|
61
|
+
webPasswordRequired: 'Password is required to protect your data.',
|
|
62
|
+
advancedPorts: 'Advanced Settings',
|
|
63
|
+
tokenSectionTitle: 'MCP Auth Token (auto-generated)',
|
|
64
|
+
tokenSectionHint: 'Used by AI agents to connect to your MindOS server.',
|
|
61
65
|
// Step 5 — Agent Tools
|
|
62
66
|
agentToolsTitle: 'Agent Tools',
|
|
63
67
|
agentToolsHint: 'Select AI agents to configure with MindOS MCP. Agents marked "not installed" can be configured now — they will work once you install the app.',
|
|
@@ -210,7 +214,7 @@ export const onboardingZh = {
|
|
|
210
214
|
dismiss: '关闭',
|
|
211
215
|
},
|
|
212
216
|
setup: {
|
|
213
|
-
stepTitles: ['知识库', 'AI
|
|
217
|
+
stepTitles: ['知识库', 'AI 配置', 'Agent 工具', '确认'],
|
|
214
218
|
// Step 1
|
|
215
219
|
kbPath: '知识库路径',
|
|
216
220
|
kbPathHint: '笔记目录的绝对路径。',
|
|
@@ -251,8 +255,12 @@ export const onboardingZh = {
|
|
|
251
255
|
generateToken: '生成',
|
|
252
256
|
copyToken: '复制',
|
|
253
257
|
copiedToken: '已复制!',
|
|
254
|
-
webPassword: '
|
|
255
|
-
webPasswordHint: '
|
|
258
|
+
webPassword: '访问密码',
|
|
259
|
+
webPasswordHint: '保护你的知识库,防止未授权的浏览器访问。',
|
|
260
|
+
webPasswordRequired: '密码是必填项,用于保护你的数据。',
|
|
261
|
+
advancedPorts: '高级设置',
|
|
262
|
+
tokenSectionTitle: 'MCP 认证令牌(已自动生成)',
|
|
263
|
+
tokenSectionHint: 'AI Agent 连接你的 MindOS 服务器时使用。',
|
|
256
264
|
// Step 5 — Agent Tools
|
|
257
265
|
agentToolsTitle: 'Agent 工具',
|
|
258
266
|
agentToolsHint: '选择要与 MindOS MCP 配置的 AI Agent。标注「未安装」的 agent 可以先行配置,安装应用后即可生效。',
|