@geminilight/mindos 0.6.40 → 0.6.41
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 +18 -18
- 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 +5 -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/ask/route.js +1 -1
- package/_standalone/.next/server/app/api/ask/route.js.nft.json +1 -1
- 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.js.nft.json +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.nft.json +1 -1
- package/_standalone/.next/server/app/api/bootstrap/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/changes/route.js.nft.json +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.nft.json +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.js.nft.json +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.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/files/route.js.nft.json +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.nft.json +1 -1
- package/_standalone/.next/server/app/api/git/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/graph/route.js.nft.json +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.js.nft.json +1 -1
- package/_standalone/.next/server/app/api/inbox/route_client-reference-manifest.js +1 -1
- package/_standalone/.next/server/app/api/init/route.js.nft.json +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.js.nft.json +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.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.js.nft.json +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.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.js.nft.json +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.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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.js.nft.json +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 +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/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 +2 -2
- 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-paths-manifest.json +18 -18
- package/_standalone/.next/server/chunks/1550.js +1 -1
- package/_standalone/.next/server/chunks/2190.js +11 -0
- package/_standalone/.next/server/chunks/{6365.js → 2536.js} +2 -2
- package/_standalone/.next/server/chunks/5648.js +2 -0
- package/_standalone/.next/server/chunks/8388.js +1 -1
- package/_standalone/.next/server/chunks/953.js +1 -1
- package/_standalone/.next/server/chunks/9539.js +219 -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/next-font-manifest.js +1 -1
- package/_standalone/.next/server/next-font-manifest.json +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/1053-b70535785cc5aaee.js +29 -0
- package/_standalone/.next/static/chunks/{8663-de911d2d395622be.js → 1880-c2a9e76201841c86.js} +1 -1
- package/_standalone/.next/static/chunks/3637.0541ac2d0ea7de1f.js +1 -0
- package/_standalone/.next/static/chunks/4563-b2a2ce80aff845af.js +6 -0
- package/_standalone/.next/static/chunks/6981-3d7dcac2d12a5670.js +1 -0
- package/_standalone/.next/static/chunks/7144-5febf62f1a79fe64.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/page-773071a99c4daac2.js +1 -0
- package/_standalone/.next/static/chunks/app/agents/page-6102a884b2cb3cfe.js +5 -0
- package/_standalone/.next/static/chunks/app/help/page-2325d25b6846ca07.js +1 -0
- package/_standalone/.next/static/chunks/app/{layout-9378c1c8d3e5761b.js → layout-42cdbce19f404567.js} +34 -34
- package/_standalone/.next/static/chunks/app/{page-9bae420fbbdc5fff.js → page-8c9643b649e01735.js} +1 -1
- package/_standalone/.next/static/chunks/app/setup/page-d158b8cb533feb1e.js +1 -0
- package/_standalone/.next/static/chunks/app/trash/{page-b61ef2d5cd4f8d73.js → page-e9ab74ffeb96af41.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-764a69a1c8bd4eef.js +12 -0
- package/_standalone/.next/static/chunks/{webpack-c28c55d0a6021a6b.js → webpack-7b276daaa930d480.js} +1 -1
- package/_standalone/.next/static/css/bc9179074eaf65ae.css +1 -0
- package/_standalone/.next/trace +63 -63
- package/_standalone/__tests__/api/mcp-install.test.ts +23 -0
- package/_standalone/__tests__/cli/agent-routing.test.ts +232 -0
- package/_standalone/__tests__/cli/file-subcommands.test.ts +379 -0
- package/_standalone/__tests__/core/tools.test.ts +3 -6
- package/_standalone/components/FileTree.tsx +3 -2
- package/_standalone/components/MarkdownView.tsx +30 -15
- package/_standalone/components/RightAskPanel.tsx +36 -6
- package/_standalone/components/Sidebar.tsx +3 -3
- package/_standalone/components/agents/AgentsMcpSection.tsx +3 -0
- package/_standalone/components/settings/McpAgentInstall.tsx +94 -27
- package/_standalone/components/settings/McpSkillsSection.tsx +1 -1
- package/_standalone/components/settings/McpTab.tsx +484 -340
- package/_standalone/components/settings/SettingsContent.tsx +12 -6
- package/_standalone/components/settings/types.ts +3 -0
- package/_standalone/components/setup/StepAgents.tsx +113 -47
- package/_standalone/components/setup/StepReview.tsx +14 -27
- package/_standalone/components/setup/types.ts +6 -0
- package/_standalone/data/skills/mindos/SKILL.md +92 -92
- package/_standalone/data/skills/mindos/references/write-supplement.md +119 -0
- package/_standalone/data/skills/mindos-zh/SKILL.md +100 -104
- package/_standalone/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/_standalone/lib/i18n/modules/features.ts +4 -4
- package/_standalone/lib/i18n/modules/knowledge.ts +4 -0
- package/_standalone/lib/i18n/modules/onboarding.ts +40 -30
- package/_standalone/lib/i18n/modules/settings.ts +78 -6
- package/_standalone/lib/mcp-snippets.ts +5 -1
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/api/ask/route.ts +3 -2
- package/app/app/api/mcp/install/route.ts +2 -1
- package/app/app/api/mcp/status/route.ts +14 -6
- package/app/app/view/[...path]/ViewPageClient.tsx +12 -27
- package/app/components/FileTree.tsx +3 -2
- package/app/components/MarkdownView.tsx +30 -15
- package/app/components/RightAskPanel.tsx +36 -6
- package/app/components/Sidebar.tsx +3 -3
- package/app/components/agents/AgentsMcpSection.tsx +3 -0
- package/app/components/help/HelpContent.tsx +1 -0
- package/app/components/settings/McpAgentInstall.tsx +94 -27
- package/app/components/settings/McpSkillsSection.tsx +1 -1
- package/app/components/settings/McpTab.tsx +484 -340
- package/app/components/settings/SettingsContent.tsx +12 -6
- package/app/components/settings/types.ts +3 -0
- package/app/components/setup/StepAgents.tsx +113 -47
- package/app/components/setup/StepReview.tsx +14 -27
- package/app/components/setup/index.tsx +12 -11
- package/app/components/setup/types.ts +6 -0
- package/app/data/skills/mindos/SKILL.md +92 -92
- package/app/data/skills/mindos/references/write-supplement.md +119 -0
- package/app/data/skills/mindos-zh/SKILL.md +100 -104
- package/app/data/skills/mindos-zh/references/write-supplement.md +119 -0
- package/app/lib/fs.ts +0 -6
- package/app/lib/i18n/modules/features.ts +4 -4
- package/app/lib/i18n/modules/knowledge.ts +4 -0
- package/app/lib/i18n/modules/onboarding.ts +40 -30
- package/app/lib/i18n/modules/settings.ts +78 -6
- package/app/lib/mcp-agents.ts +1 -2
- package/app/lib/mcp-snippets.ts +5 -1
- package/app/lib/renderers/index.ts +2 -1
- package/bin/cli.js +168 -1404
- package/bin/commands/agent.js +156 -20
- package/bin/commands/api.js +14 -11
- package/bin/commands/ask.js +79 -68
- package/bin/commands/build.js +26 -0
- package/bin/commands/config.js +170 -0
- package/bin/commands/dev.js +58 -0
- package/bin/commands/doctor.js +205 -0
- package/bin/commands/file.js +551 -36
- package/bin/commands/gateway.js +42 -0
- package/bin/commands/init-skills.js +56 -0
- package/bin/commands/logs.js +32 -0
- package/bin/commands/mcp-cmd.js +57 -0
- package/bin/commands/onboard.js +25 -0
- package/bin/commands/open.js +41 -0
- package/bin/commands/restart.js +48 -0
- package/bin/commands/search.js +16 -14
- package/bin/commands/space.js +96 -25
- package/bin/commands/start.js +262 -0
- package/bin/commands/status.js +2 -2
- package/bin/commands/stop.js +14 -0
- package/bin/commands/sync-cmd.js +134 -0
- package/bin/commands/token.js +98 -0
- package/bin/commands/uninstall.js +154 -0
- package/bin/commands/update.js +286 -0
- package/bin/lib/build.js +1 -1
- package/bin/lib/colors.js +8 -7
- package/bin/lib/command.js +37 -96
- package/bin/lib/config.js +5 -0
- package/bin/lib/csv.js +19 -0
- package/bin/lib/jsonc.js +12 -0
- package/bin/lib/markdown.js +69 -0
- package/bin/lib/mcp-agents.js +1 -6
- package/bin/lib/mcp-build.js +1 -1
- package/bin/lib/mcp-install.js +2 -1
- package/bin/lib/one-shot.js +88 -0
- package/bin/lib/path-expand.js +9 -0
- package/bin/lib/remote.js +65 -0
- package/bin/lib/repl.js +167 -0
- package/bin/lib/{utils.js → shell.js} +10 -26
- package/bin/lib/skill-check.js +1 -1
- package/bin/lib/sse-stream.js +167 -0
- package/package.json +2 -2
- package/scripts/setup.js +182 -120
- package/skills/mindos/SKILL.md +92 -92
- package/skills/mindos-zh/SKILL.md +100 -104
- package/_standalone/.next/server/chunks/1955.js +0 -11
- package/_standalone/.next/server/chunks/3680.js +0 -1
- package/_standalone/.next/server/chunks/4497.js +0 -219
- package/_standalone/.next/server/chunks/5560.js +0 -2
- package/_standalone/.next/static/chunks/1053-0adaccc98a752a58.js +0 -29
- package/_standalone/.next/static/chunks/3637.f9a42cca59fd5bb5.js +0 -1
- package/_standalone/.next/static/chunks/4563-c2afaeacb241d1d0.js +0 -6
- package/_standalone/.next/static/chunks/6090-c98268ca726a68d3.js +0 -1
- package/_standalone/.next/static/chunks/9371-575600301da5d6bb.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/[agentKey]/page-3e08abb495ecd5fd.js +0 -1
- package/_standalone/.next/static/chunks/app/agents/page-e7e0f87ad3d765ac.js +0 -5
- package/_standalone/.next/static/chunks/app/help/page-3d0e1ceaa4abc243.js +0 -1
- package/_standalone/.next/static/chunks/app/setup/page-99ed3d1bb6b8f4ef.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-44fa78cbea613a78.js +0 -12
- package/_standalone/.next/static/css/d300701f384db50d.css +0 -1
- package/_standalone/components/renderers/agent-inspector/manifest.ts +0 -16
- /package/_standalone/.next/static/{rZLs1krFuduixvcVNe6q3 → Ij3PFh-a0zi5K_ANoSAW0}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{rZLs1krFuduixvcVNe6q3 → Ij3PFh-a0zi5K_ANoSAW0}/_ssgManifest.js +0 -0
|
@@ -30,6 +30,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
30
30
|
const router = useRouter();
|
|
31
31
|
const saveTimer = useRef<ReturnType<typeof setTimeout>>(undefined);
|
|
32
32
|
const dataLoaded = useRef(false);
|
|
33
|
+
const contentRef = useRef<HTMLDivElement>(null);
|
|
33
34
|
|
|
34
35
|
const [font, setFont] = useState('lora');
|
|
35
36
|
const [fontSize, setFontSize] = useState('15px');
|
|
@@ -77,9 +78,14 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
77
78
|
}, [visible, isPanel]);
|
|
78
79
|
|
|
79
80
|
useEffect(() => {
|
|
80
|
-
if (visible && initialTab)
|
|
81
|
+
if (visible && initialTab) switchTab(initialTab);
|
|
81
82
|
}, [visible, initialTab]);
|
|
82
83
|
|
|
84
|
+
const switchTab = useCallback((id: Tab) => {
|
|
85
|
+
setTab(id);
|
|
86
|
+
contentRef.current?.scrollTo?.(0, 0);
|
|
87
|
+
}, []);
|
|
88
|
+
|
|
83
89
|
useEffect(() => {
|
|
84
90
|
const fontMap: Record<string, string> = {
|
|
85
91
|
'lora': "'Lora', Georgia, serif",
|
|
@@ -164,7 +170,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
164
170
|
|
|
165
171
|
const TABS: { id: Tab; label: string; icon: React.ReactNode; badge?: boolean }[] = [
|
|
166
172
|
{ id: 'ai', label: t.settings.tabs.ai, icon: <Sparkles size={iconSize} /> },
|
|
167
|
-
{ id: 'mcp', label: t.settings.tabs.mcp ?? '
|
|
173
|
+
{ id: 'mcp', label: t.settings.tabs.mcp ?? 'Connections', icon: <Plug size={iconSize} /> },
|
|
168
174
|
{ id: 'knowledge', label: t.settings.tabs.knowledge, icon: <Settings size={iconSize} /> },
|
|
169
175
|
{ id: 'appearance', label: t.settings.tabs.appearance, icon: <Palette size={iconSize} /> },
|
|
170
176
|
{ id: 'sync', label: t.settings.tabs.sync ?? 'Sync', icon: <RefreshCw size={iconSize} /> },
|
|
@@ -176,7 +182,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
176
182
|
|
|
177
183
|
/* ── Shared content & footer ── */
|
|
178
184
|
const renderContent = () => (
|
|
179
|
-
<div className={`flex-1 overflow-y-auto min-h-0 ${isPanel ? 'px-4 py-4 space-y-4' : 'px-5 py-5 space-y-5'}`}>
|
|
185
|
+
<div ref={contentRef} className={`flex-1 overflow-y-auto min-h-0 ${isPanel ? 'px-4 py-4 space-y-4' : 'px-5 py-5 space-y-5'}`}>
|
|
180
186
|
{status === 'load-error' && (tab === 'ai' || tab === 'knowledge') ? (
|
|
181
187
|
<div className="flex flex-col items-center gap-2 py-8 text-center">
|
|
182
188
|
<AlertCircle size={isPanel ? 18 : 20} className="text-destructive" />
|
|
@@ -257,7 +263,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
257
263
|
{TABS.map(tabItem => (
|
|
258
264
|
<button
|
|
259
265
|
key={tabItem.id}
|
|
260
|
-
onClick={() =>
|
|
266
|
+
onClick={() => switchTab(tabItem.id)}
|
|
261
267
|
className={`flex items-center gap-1 px-2 py-2 text-xs font-medium transition-colors border-b-2 -mb-px whitespace-nowrap ${
|
|
262
268
|
tab === tabItem.id
|
|
263
269
|
? 'border-[var(--amber)] text-foreground'
|
|
@@ -308,7 +314,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
308
314
|
{TABS.map(tabItem => (
|
|
309
315
|
<button
|
|
310
316
|
key={tabItem.id}
|
|
311
|
-
onClick={() =>
|
|
317
|
+
onClick={() => switchTab(tabItem.id)}
|
|
312
318
|
className={`flex items-center gap-1.5 px-3 py-2.5 text-sm font-medium transition-colors border-b-2 -mb-px whitespace-nowrap ${
|
|
313
319
|
tab === tabItem.id
|
|
314
320
|
? 'border-[var(--amber)] text-foreground'
|
|
@@ -344,7 +350,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
344
350
|
{TABS.map(tabItem => (
|
|
345
351
|
<button
|
|
346
352
|
key={tabItem.id}
|
|
347
|
-
onClick={() =>
|
|
353
|
+
onClick={() => switchTab(tabItem.id)}
|
|
348
354
|
className={`flex items-center gap-2 w-full px-4 py-2 text-sm font-medium transition-colors relative ${
|
|
349
355
|
tab === tabItem.id
|
|
350
356
|
? 'text-foreground bg-muted'
|
|
@@ -66,6 +66,7 @@ export interface McpStatus {
|
|
|
66
66
|
authConfigured: boolean;
|
|
67
67
|
maskedToken?: string;
|
|
68
68
|
authToken?: string;
|
|
69
|
+
localIP?: string | null;
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
export interface AgentInfo {
|
|
@@ -177,6 +178,8 @@ export interface McpAgentInstallProps {
|
|
|
177
178
|
agents: AgentInfo[];
|
|
178
179
|
t: Messages;
|
|
179
180
|
onRefresh: () => void;
|
|
181
|
+
mode?: 'cli' | 'mcp';
|
|
182
|
+
activeSkillName?: string;
|
|
180
183
|
}
|
|
181
184
|
|
|
182
185
|
export interface McpSkillsSectionProps {
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useMemo } from 'react';
|
|
4
4
|
import {
|
|
5
|
-
Loader2, CheckCircle2, XCircle, Brain, ChevronDown,
|
|
5
|
+
Loader2, CheckCircle2, XCircle, Brain, ChevronDown, Terminal, Plug,
|
|
6
6
|
} from 'lucide-react';
|
|
7
7
|
import { Field, Select } from '@/components/settings/Primitives';
|
|
8
|
-
import type { SetupMessages, McpMessages,
|
|
8
|
+
import type { SetupMessages, McpMessages, AgentEntry, AgentInstallStatus, ConnectionMode } from './types';
|
|
9
9
|
|
|
10
10
|
export interface StepAgentsProps {
|
|
11
11
|
agents: AgentEntry[];
|
|
12
12
|
agentsLoading: boolean;
|
|
13
13
|
selectedAgents: Set<string>;
|
|
14
14
|
setSelectedAgents: React.Dispatch<React.SetStateAction<Set<string>>>;
|
|
15
|
+
connectionMode: ConnectionMode;
|
|
16
|
+
setConnectionMode: React.Dispatch<React.SetStateAction<ConnectionMode>>;
|
|
15
17
|
agentTransport: 'auto' | 'stdio' | 'http';
|
|
16
18
|
setAgentTransport: (v: 'auto' | 'stdio' | 'http') => void;
|
|
17
19
|
agentScope: 'global' | 'project';
|
|
@@ -19,13 +21,13 @@ export interface StepAgentsProps {
|
|
|
19
21
|
agentStatuses: Record<string, AgentInstallStatus>;
|
|
20
22
|
s: SetupMessages;
|
|
21
23
|
settingsMcp: McpMessages;
|
|
22
|
-
template: Template;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export default function StepAgents({
|
|
26
27
|
agents, agentsLoading, selectedAgents, setSelectedAgents,
|
|
28
|
+
connectionMode, setConnectionMode,
|
|
27
29
|
agentTransport, setAgentTransport, agentScope, setAgentScope,
|
|
28
|
-
agentStatuses, s, settingsMcp,
|
|
30
|
+
agentStatuses, s, settingsMcp,
|
|
29
31
|
}: StepAgentsProps) {
|
|
30
32
|
const toggleAgent = (key: string) => {
|
|
31
33
|
setSelectedAgents(prev => {
|
|
@@ -105,17 +107,82 @@ export default function StepAgents({
|
|
|
105
107
|
disabled={agentStatuses[agent.key]?.state === 'installing'}
|
|
106
108
|
/>
|
|
107
109
|
<span className="text-sm flex-1" style={{ color: 'var(--foreground)' }}>{agent.name}</span>
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
110
|
+
{connectionMode.mcp && (
|
|
111
|
+
<span className="text-2xs px-1.5 py-0.5 rounded font-mono"
|
|
112
|
+
style={{ background: 'color-mix(in srgb, var(--muted-foreground) 8%, transparent)', color: 'var(--muted-foreground)' }}>
|
|
113
|
+
{getEffectiveTransport(agent)}
|
|
114
|
+
</span>
|
|
115
|
+
)}
|
|
112
116
|
{getStatusBadge(agent.key, agent)}
|
|
113
117
|
</label>
|
|
114
118
|
);
|
|
115
119
|
|
|
116
120
|
return (
|
|
117
121
|
<div className="space-y-5">
|
|
118
|
-
|
|
122
|
+
{/* Connection Mode Toggle */}
|
|
123
|
+
<div className="space-y-2">
|
|
124
|
+
<p className="text-xs font-medium" style={{ color: 'var(--muted-foreground)' }}>
|
|
125
|
+
{s.connectionModeTitle}
|
|
126
|
+
</p>
|
|
127
|
+
<div className="grid grid-cols-2 gap-3">
|
|
128
|
+
<label
|
|
129
|
+
className="flex items-start gap-3 px-4 py-3 rounded-xl border cursor-pointer transition-all"
|
|
130
|
+
style={{
|
|
131
|
+
borderColor: connectionMode.cli ? 'var(--amber)' : 'var(--border)',
|
|
132
|
+
background: connectionMode.cli ? 'color-mix(in srgb, var(--amber) 6%, transparent)' : 'transparent',
|
|
133
|
+
}}>
|
|
134
|
+
<input
|
|
135
|
+
type="checkbox"
|
|
136
|
+
checked={connectionMode.cli}
|
|
137
|
+
onChange={() => setConnectionMode(prev => ({ ...prev, cli: !prev.cli }))}
|
|
138
|
+
className="form-check mt-0.5"
|
|
139
|
+
/>
|
|
140
|
+
<div className="flex-1 min-w-0">
|
|
141
|
+
<div className="flex items-center gap-1.5 text-sm font-medium" style={{ color: 'var(--foreground)' }}>
|
|
142
|
+
<Terminal size={13} className="shrink-0" /> CLI
|
|
143
|
+
</div>
|
|
144
|
+
<p className="text-2xs mt-0.5" style={{ color: 'var(--muted-foreground)' }}>
|
|
145
|
+
{s.connectionModeCliHint}
|
|
146
|
+
</p>
|
|
147
|
+
</div>
|
|
148
|
+
</label>
|
|
149
|
+
<label
|
|
150
|
+
className="flex items-start gap-3 px-4 py-3 rounded-xl border cursor-pointer transition-all"
|
|
151
|
+
style={{
|
|
152
|
+
borderColor: connectionMode.mcp ? 'var(--amber)' : 'var(--border)',
|
|
153
|
+
background: connectionMode.mcp ? 'color-mix(in srgb, var(--amber) 6%, transparent)' : 'transparent',
|
|
154
|
+
}}>
|
|
155
|
+
<input
|
|
156
|
+
type="checkbox"
|
|
157
|
+
checked={connectionMode.mcp}
|
|
158
|
+
onChange={() => setConnectionMode(prev => ({ ...prev, mcp: !prev.mcp }))}
|
|
159
|
+
className="form-check mt-0.5"
|
|
160
|
+
/>
|
|
161
|
+
<div className="flex-1 min-w-0">
|
|
162
|
+
<div className="flex items-center gap-1.5 text-sm font-medium" style={{ color: 'var(--foreground)' }}>
|
|
163
|
+
<Plug size={13} className="shrink-0" /> MCP
|
|
164
|
+
</div>
|
|
165
|
+
<p className="text-2xs mt-0.5" style={{ color: 'var(--muted-foreground)' }}>
|
|
166
|
+
{s.connectionModeMcpHint}
|
|
167
|
+
</p>
|
|
168
|
+
</div>
|
|
169
|
+
</label>
|
|
170
|
+
</div>
|
|
171
|
+
</div>
|
|
172
|
+
|
|
173
|
+
{/* Hint — contextual based on connection mode */}
|
|
174
|
+
{!connectionMode.cli && !connectionMode.mcp ? (
|
|
175
|
+
<div className="flex items-center gap-2 px-3 py-2.5 rounded-lg text-xs"
|
|
176
|
+
style={{ background: 'color-mix(in srgb, var(--amber) 8%, transparent)', color: 'var(--amber)' }}>
|
|
177
|
+
<Brain size={13} className="shrink-0" />
|
|
178
|
+
<span>{s.agentToolsHintNone}</span>
|
|
179
|
+
</div>
|
|
180
|
+
) : (
|
|
181
|
+
<p className="text-sm" style={{ color: 'var(--muted-foreground)' }}>
|
|
182
|
+
{!connectionMode.mcp && connectionMode.cli ? s.agentToolsHintCliOnly : s.agentToolsHint}
|
|
183
|
+
</p>
|
|
184
|
+
)}
|
|
185
|
+
|
|
119
186
|
{agentsLoading ? (
|
|
120
187
|
<div className="flex items-center gap-2 py-4" style={{ color: 'var(--muted-foreground)' }}>
|
|
121
188
|
<Loader2 size={14} className="animate-spin" />
|
|
@@ -172,46 +239,45 @@ export default function StepAgents({
|
|
|
172
239
|
)}
|
|
173
240
|
</div>
|
|
174
241
|
)}
|
|
175
|
-
{/*
|
|
176
|
-
|
|
177
|
-
<
|
|
178
|
-
{
|
|
179
|
-
</p>
|
|
180
|
-
<div className="flex items-center gap-2 px-3 py-2 rounded-lg text-xs"
|
|
181
|
-
style={{ background: 'color-mix(in srgb, var(--muted-foreground) 6%, transparent)', color: 'var(--muted-foreground)' }}>
|
|
242
|
+
{/* Hint when no agents selected — only relevant for MCP mode */}
|
|
243
|
+
{connectionMode.mcp && selectedAgents.size === 0 && (
|
|
244
|
+
<div className="flex items-center gap-2 px-3 py-2.5 rounded-lg text-xs"
|
|
245
|
+
style={{ background: 'color-mix(in srgb, var(--amber) 8%, transparent)', color: 'var(--amber)' }}>
|
|
182
246
|
<Brain size={13} className="shrink-0" />
|
|
183
|
-
<span>{s.
|
|
247
|
+
<span>{s.agentNoneSelected}</span>
|
|
184
248
|
</div>
|
|
185
|
-
|
|
186
|
-
{/* Advanced options —
|
|
187
|
-
|
|
188
|
-
<
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
<
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
<
|
|
208
|
-
<
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
249
|
+
)}
|
|
250
|
+
{/* Advanced options — only when MCP is enabled */}
|
|
251
|
+
{connectionMode.mcp && (
|
|
252
|
+
<div>
|
|
253
|
+
<button
|
|
254
|
+
type="button"
|
|
255
|
+
onClick={() => setShowAdvanced(!showAdvanced)}
|
|
256
|
+
aria-expanded={showAdvanced}
|
|
257
|
+
className="flex items-center gap-1.5 text-xs py-1.5 transition-colors"
|
|
258
|
+
style={{ color: 'var(--muted-foreground)' }}>
|
|
259
|
+
<ChevronDown size={12} className={`transition-transform ${showAdvanced ? 'rotate-180' : ''}`} />
|
|
260
|
+
{s.agentAdvanced}
|
|
261
|
+
</button>
|
|
262
|
+
{showAdvanced && (
|
|
263
|
+
<div className="grid grid-cols-2 gap-4 mt-2">
|
|
264
|
+
<Field label={s.agentTransport}>
|
|
265
|
+
<Select value={agentTransport} onChange={e => setAgentTransport(e.target.value as 'auto' | 'stdio' | 'http')}>
|
|
266
|
+
<option value="auto">{s.agentTransportAuto}</option>
|
|
267
|
+
<option value="stdio">{settingsMcp.transportStdio}</option>
|
|
268
|
+
<option value="http">{settingsMcp.transportHttp}</option>
|
|
269
|
+
</Select>
|
|
270
|
+
</Field>
|
|
271
|
+
<Field label={s.agentScope}>
|
|
272
|
+
<Select value={agentScope} onChange={e => setAgentScope(e.target.value as 'global' | 'project')}>
|
|
273
|
+
<option value="global">{s.agentScopeGlobal}</option>
|
|
274
|
+
<option value="project">{s.agentScopeProject}</option>
|
|
275
|
+
</Select>
|
|
276
|
+
</Field>
|
|
277
|
+
</div>
|
|
278
|
+
)}
|
|
279
|
+
</div>
|
|
280
|
+
)}
|
|
215
281
|
<div className="flex gap-2 mt-1">
|
|
216
282
|
<button
|
|
217
283
|
type="button"
|
|
@@ -91,32 +91,34 @@ export interface StepReviewProps {
|
|
|
91
91
|
error: string;
|
|
92
92
|
needsRestart: boolean;
|
|
93
93
|
s: SetupMessages;
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
setupPhase: 'review' | 'saving' | 'agents' | 'done';
|
|
95
|
+
cliEnabled: boolean;
|
|
96
|
+
mcpEnabled: boolean;
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
export default function StepReview({
|
|
99
100
|
state, selectedAgents, agentStatuses, onRetryAgent, error, needsRestart, s,
|
|
100
|
-
|
|
101
|
+
setupPhase, cliEnabled, mcpEnabled,
|
|
101
102
|
}: StepReviewProps) {
|
|
102
103
|
const failedAgents = Object.entries(agentStatuses).filter(([, v]) => v.state === 'error');
|
|
103
104
|
|
|
104
105
|
// Compact config summary (only key info)
|
|
106
|
+
const modeLabel = cliEnabled && mcpEnabled ? 'CLI + MCP' : cliEnabled ? 'CLI' : mcpEnabled ? 'MCP' : '—';
|
|
105
107
|
const summaryRows: [string, string][] = [
|
|
106
108
|
[s.kbPath, state.mindRoot],
|
|
107
109
|
[s.webPort, `${state.webPort} / ${state.mcpPort}`],
|
|
108
|
-
[s.agentToolsTitle, selectedAgents.size > 0 ? s.agentCountSummary(selectedAgents.size) :
|
|
110
|
+
[s.agentToolsTitle, mcpEnabled && selectedAgents.size > 0 ? `${modeLabel} · ${s.agentCountSummary(selectedAgents.size)}` : modeLabel],
|
|
109
111
|
];
|
|
110
112
|
|
|
111
|
-
// Progress stepper phases
|
|
113
|
+
// Progress stepper phases — dynamically built based on selected modes
|
|
112
114
|
type Phase = typeof setupPhase;
|
|
115
|
+
const showAgentPhase = mcpEnabled && selectedAgents.size > 0;
|
|
113
116
|
const phases: { key: Phase; label: string }[] = [
|
|
114
117
|
{ key: 'saving', label: s.phaseSaving },
|
|
115
|
-
{ key: 'agents', label: s.phaseAgents },
|
|
116
|
-
{ key: 'skill', label: s.phaseSkill },
|
|
118
|
+
...(showAgentPhase ? [{ key: 'agents' as Phase, label: s.phaseAgents }] : []),
|
|
117
119
|
{ key: 'done', label: s.phaseDone },
|
|
118
120
|
];
|
|
119
|
-
const phaseOrder: Phase[] =
|
|
121
|
+
const phaseOrder: Phase[] = phases.map(p => p.key);
|
|
120
122
|
const currentIdx = phaseOrder.indexOf(setupPhase);
|
|
121
123
|
|
|
122
124
|
return (
|
|
@@ -198,21 +200,6 @@ export default function StepReview({
|
|
|
198
200
|
</div>
|
|
199
201
|
)}
|
|
200
202
|
|
|
201
|
-
{/* Skill result — compact */}
|
|
202
|
-
{skillInstallResult && setupPhase === 'done' && (
|
|
203
|
-
<div className="flex items-center gap-2 text-xs px-3 py-2 rounded-lg" style={{
|
|
204
|
-
background: skillInstallResult.ok ? 'color-mix(in srgb, var(--success) 6%, transparent)' : 'color-mix(in srgb, var(--error) 6%, transparent)',
|
|
205
|
-
}}>
|
|
206
|
-
{skillInstallResult.ok ? (
|
|
207
|
-
<><CheckCircle2 size={11} className="text-success shrink-0" />
|
|
208
|
-
<span style={{ color: 'var(--foreground)' }}>{s.skillInstalled} — {skillInstallResult.skill}</span></>
|
|
209
|
-
) : (
|
|
210
|
-
<><XCircle size={11} className="text-error shrink-0" />
|
|
211
|
-
<span style={{ color: 'var(--error)' }}>{s.skillFailed}{skillInstallResult.error ? `: ${skillInstallResult.error}` : ''}</span></>
|
|
212
|
-
)}
|
|
213
|
-
</div>
|
|
214
|
-
)}
|
|
215
|
-
|
|
216
203
|
{error && (
|
|
217
204
|
<div className="p-3 rounded-lg text-sm text-error" style={{ background: 'color-mix(in srgb, var(--error) 10%, transparent)' }}>
|
|
218
205
|
{s.completeFailed}: {error}
|
|
@@ -300,13 +287,13 @@ function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s
|
|
|
300
287
|
{
|
|
301
288
|
ok: agentsOk,
|
|
302
289
|
icon: <Plug size={14} />,
|
|
303
|
-
title: s.healthAgents ?? 'Agent
|
|
290
|
+
title: s.healthAgents ?? 'Agent Connection',
|
|
304
291
|
detail: agentsOk
|
|
305
292
|
? (s.healthAgentsOk?.(successAgents) ?? `${successAgents} agent(s) configured`)
|
|
306
293
|
: selectedAgents.size > 0
|
|
307
294
|
? (s.healthAgentsPartial ?? 'Configuration in progress...')
|
|
308
295
|
: (s.healthAgentsNone ?? 'No agents configured'),
|
|
309
|
-
action: agentsOk ? undefined : (s.healthAgentsAction ?? 'You can add agents later in Settings →
|
|
296
|
+
action: agentsOk ? undefined : (s.healthAgentsAction ?? 'You can add agents later in Settings → Connections.'),
|
|
310
297
|
},
|
|
311
298
|
];
|
|
312
299
|
|
|
@@ -350,7 +337,7 @@ function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s
|
|
|
350
337
|
<div className="rounded-xl border p-4 space-y-2" style={{ borderColor: 'var(--border)', background: 'var(--card)' }}>
|
|
351
338
|
<div className="flex items-center gap-1.5 text-xs font-medium uppercase tracking-wider" style={{ color: 'var(--muted-foreground)' }}>
|
|
352
339
|
<Shield size={11} />
|
|
353
|
-
{s.healthTokenTitle ?? '
|
|
340
|
+
{s.healthTokenTitle ?? 'Auth Token'}
|
|
354
341
|
</div>
|
|
355
342
|
<div className="flex items-center gap-2">
|
|
356
343
|
<div className="flex-1 flex items-center px-3 py-2 rounded-lg min-h-[38px]"
|
|
@@ -373,7 +360,7 @@ function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s
|
|
|
373
360
|
</button>
|
|
374
361
|
</div>
|
|
375
362
|
<p className="text-xs" style={{ color: 'var(--muted-foreground)' }}>
|
|
376
|
-
{s.healthTokenHint ?? 'Use this token when connecting AI agents. Also available in Settings →
|
|
363
|
+
{s.healthTokenHint ?? 'Use this token when connecting AI agents. Also available in Settings → Connections.'}
|
|
377
364
|
</p>
|
|
378
365
|
</div>
|
|
379
366
|
)}
|
|
@@ -5,7 +5,7 @@ import { Sparkles, Loader2, ChevronLeft, ChevronRight } from 'lucide-react';
|
|
|
5
5
|
import { useLocale } from '@/lib/stores/locale-store';
|
|
6
6
|
import { copyToClipboard } from '@/lib/clipboard';
|
|
7
7
|
import { toast } from '@/lib/toast';
|
|
8
|
-
import type { SetupState, PortStatus, AgentEntry, AgentInstallStatus, ProviderSetupConfig } from './types';
|
|
8
|
+
import type { SetupState, PortStatus, AgentEntry, AgentInstallStatus, ProviderSetupConfig, ConnectionMode } from './types';
|
|
9
9
|
import { type ProviderId, isProviderId, PROVIDER_PRESETS } from '@/lib/agent/providers';
|
|
10
10
|
import { TOTAL_STEPS, STEP_KB, STEP_AI, STEP_AGENTS, STEP_REVIEW } from './constants';
|
|
11
11
|
import StepKB from './StepKB';
|
|
@@ -149,8 +149,8 @@ export default function SetupWizard() {
|
|
|
149
149
|
const [agentTransport, setAgentTransport] = useState<'auto' | 'stdio' | 'http'>('auto');
|
|
150
150
|
const [agentScope, setAgentScope] = useState<'global' | 'project'>('global');
|
|
151
151
|
const [agentStatuses, setAgentStatuses] = useState<Record<string, AgentInstallStatus>>({});
|
|
152
|
-
const [
|
|
153
|
-
const [setupPhase, setSetupPhase] = useState<'review' | 'saving' | 'agents' | '
|
|
152
|
+
const [connectionMode, setConnectionMode] = useState<ConnectionMode>({ cli: true, mcp: false });
|
|
153
|
+
const [setupPhase, setSetupPhase] = useState<'review' | 'saving' | 'agents' | 'done'>('review');
|
|
154
154
|
|
|
155
155
|
// Load existing config as defaults on mount, generate token if none exists
|
|
156
156
|
useEffect(() => {
|
|
@@ -291,6 +291,9 @@ export default function SetupWizard() {
|
|
|
291
291
|
if (webPortStatus.available === false || mcpPortStatus.available === false) return false;
|
|
292
292
|
return true;
|
|
293
293
|
}
|
|
294
|
+
if (step === STEP_AGENTS) {
|
|
295
|
+
return connectionMode.cli || connectionMode.mcp;
|
|
296
|
+
}
|
|
294
297
|
return true;
|
|
295
298
|
};
|
|
296
299
|
|
|
@@ -325,9 +328,9 @@ export default function SetupWizard() {
|
|
|
325
328
|
return;
|
|
326
329
|
}
|
|
327
330
|
|
|
328
|
-
// Phase 2: Install agents
|
|
329
|
-
|
|
330
|
-
|
|
331
|
+
// Phase 2: Install MCP config to agents (only when MCP mode is enabled)
|
|
332
|
+
if (connectionMode.mcp && agentKeys.length > 0) {
|
|
333
|
+
setSetupPhase('agents');
|
|
331
334
|
const initialStatuses: Record<string, AgentInstallStatus> = {};
|
|
332
335
|
for (const key of agentKeys) initialStatuses[key] = { state: 'installing' };
|
|
333
336
|
setAgentStatuses(initialStatuses);
|
|
@@ -343,9 +346,6 @@ export default function SetupWizard() {
|
|
|
343
346
|
}
|
|
344
347
|
}
|
|
345
348
|
|
|
346
|
-
// Phase 3: Skill is now built into SKILL.md — no install needed.
|
|
347
|
-
// .mindos/user-preferences.md will be created on first preference capture.
|
|
348
|
-
|
|
349
349
|
setSubmitting(false);
|
|
350
350
|
setCompleted(true);
|
|
351
351
|
setSetupPhase('done');
|
|
@@ -412,10 +412,10 @@ export default function SetupWizard() {
|
|
|
412
412
|
<StepAgents
|
|
413
413
|
agents={agents} agentsLoading={agentsLoading}
|
|
414
414
|
selectedAgents={selectedAgents} setSelectedAgents={setSelectedAgents}
|
|
415
|
+
connectionMode={connectionMode} setConnectionMode={setConnectionMode}
|
|
415
416
|
agentTransport={agentTransport} setAgentTransport={setAgentTransport}
|
|
416
417
|
agentScope={agentScope} setAgentScope={setAgentScope}
|
|
417
418
|
agentStatuses={agentStatuses} s={s} settingsMcp={t.settings.mcp}
|
|
418
|
-
template={state.template}
|
|
419
419
|
/>
|
|
420
420
|
)}
|
|
421
421
|
{step === 3 && (
|
|
@@ -424,8 +424,9 @@ export default function SetupWizard() {
|
|
|
424
424
|
agentStatuses={agentStatuses} onRetryAgent={retryAgent}
|
|
425
425
|
error={error} needsRestart={needsRestart}
|
|
426
426
|
s={s}
|
|
427
|
-
skillInstallResult={skillInstallResult}
|
|
428
427
|
setupPhase={setupPhase}
|
|
428
|
+
cliEnabled={connectionMode.cli}
|
|
429
|
+
mcpEnabled={connectionMode.mcp}
|
|
429
430
|
/>
|
|
430
431
|
)}
|
|
431
432
|
|
|
@@ -28,6 +28,12 @@ export interface SetupState {
|
|
|
28
28
|
webPassword: string;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
// ─── Connection mode (CLI / MCP toggle) ──────────────────────────────────────
|
|
32
|
+
export interface ConnectionMode {
|
|
33
|
+
cli: boolean;
|
|
34
|
+
mcp: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
31
37
|
// ─── Port check ──────────────────────────────────────────────────────────────
|
|
32
38
|
export interface PortStatus {
|
|
33
39
|
checking: boolean;
|