@geminilight/mindos 0.6.47 → 0.6.49
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 +23 -23
- 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 +23 -23
- 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.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/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 +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 +2 -2
- 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 +23 -23
- package/_standalone/.next/server/chunks/4241.js +25 -25
- package/_standalone/.next/server/chunks/{6946.js → 9986.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/{1053-98e7148893702bd2.js → 1053-8cb7fd1bfbbbedd3.js} +2 -2
- package/_standalone/.next/static/chunks/app/agents/{page-eac6c5f6650dbf62.js → page-0d9920b591ce999f.js} +1 -1
- package/_standalone/.next/static/chunks/app/echo/[segment]/{page-addf014fcf23fad5.js → page-88df174dd64b2c76.js} +1 -1
- package/_standalone/.next/static/chunks/app/{layout-5cbdae4ee15fb842.js → layout-e49b880ef457bb2c.js} +27 -27
- package/_standalone/.next/static/chunks/app/page-b3a7338f30362edb.js +7 -0
- package/_standalone/.next/static/chunks/app/setup/page-81c37de31c9a5beb.js +1 -0
- package/_standalone/.next/static/chunks/app/trash/{page-4e18cc618035d072.js → page-c8bf8845e81cf112.js} +1 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-409e1b9baa22c66a.js +12 -0
- package/_standalone/.next/trace +63 -63
- package/_standalone/components/ask/ProviderModelCapsule.tsx +3 -1
- package/_standalone/components/settings/SettingsContent.tsx +1 -0
- package/_standalone/components/setup/StepAgents.tsx +24 -3
- package/_standalone/components/setup/StepReview.tsx +55 -15
- package/_standalone/hooks/useAcpDetection.ts +6 -0
- package/_standalone/hooks/useSettingsAiAvailable.ts +17 -11
- package/_standalone/lib/i18n/modules/onboarding.ts +14 -0
- package/_standalone/tsconfig.tsbuildinfo +1 -1
- package/app/app/api/ask/route.ts +53 -7
- package/app/app/api/auth/route.ts +3 -0
- package/app/components/ask/ProviderModelCapsule.tsx +3 -1
- package/app/components/settings/SettingsContent.tsx +1 -0
- package/app/components/setup/StepAgents.tsx +24 -3
- package/app/components/setup/StepReview.tsx +55 -15
- package/app/components/setup/index.tsx +44 -2
- package/app/hooks/useAcpDetection.ts +6 -0
- package/app/hooks/useSettingsAiAvailable.ts +17 -11
- package/app/lib/i18n/modules/onboarding.ts +14 -0
- package/bin/commands/file.js +16 -1
- package/package.json +1 -1
- package/scripts/build-runtime-archive.sh +3 -0
- package/_standalone/.next/static/chunks/app/page-30cf129e870aa3b2.js +0 -7
- package/_standalone/.next/static/chunks/app/setup/page-abad6be1750aba3e.js +0 -1
- package/_standalone/.next/static/chunks/app/view/[...path]/page-26775356655fa712.js +0 -12
- /package/_standalone/.next/static/{5-9HMGiRDVPCrib2GFNC6 → v1Q015tiqW8z0rkxr-Kpt}/_buildManifest.js +0 -0
- /package/_standalone/.next/static/{5-9HMGiRDVPCrib2GFNC6 → v1Q015tiqW8z0rkxr-Kpt}/_ssgManifest.js +0 -0
|
@@ -95,8 +95,10 @@ export default function ProviderModelCapsule({
|
|
|
95
95
|
};
|
|
96
96
|
doFetch();
|
|
97
97
|
const onVisible = () => { if (document.visibilityState === 'visible') doFetch(); };
|
|
98
|
+
const onSettingsChanged = () => doFetch();
|
|
98
99
|
document.addEventListener('visibilitychange', onVisible);
|
|
99
|
-
|
|
100
|
+
window.addEventListener('mindos:settings-changed', onSettingsChanged);
|
|
101
|
+
return () => { cancelled = true; document.removeEventListener('visibilitychange', onVisible); window.removeEventListener('mindos:settings-changed', onSettingsChanged); };
|
|
100
102
|
}, []);
|
|
101
103
|
|
|
102
104
|
const defaultProvider = (settingsData?.ai?.provider && isProviderId(settingsData.ai.provider))
|
|
@@ -124,6 +124,7 @@ export default function SettingsContent({ visible, initialTab, variant, onClose
|
|
|
124
124
|
body: JSON.stringify({ ai: d.ai, agent: d.agent, mindRoot: d.mindRoot, webPassword: d.webPassword, authToken: d.authToken }),
|
|
125
125
|
});
|
|
126
126
|
setStatus('saved');
|
|
127
|
+
window.dispatchEvent(new Event('mindos:settings-changed'));
|
|
127
128
|
setTimeout(() => setStatus('idle'), 2500);
|
|
128
129
|
} catch {
|
|
129
130
|
setStatus('error');
|
|
@@ -7,6 +7,16 @@ import {
|
|
|
7
7
|
import { Field, Select } from '@/components/settings/Primitives';
|
|
8
8
|
import type { SetupMessages, McpMessages, AgentEntry, AgentInstallStatus, ConnectionMode } from './types';
|
|
9
9
|
|
|
10
|
+
const AGENT_INSTALL_URLS: Record<string, string> = {
|
|
11
|
+
'claude-code': 'https://docs.anthropic.com/en/docs/claude-code/overview',
|
|
12
|
+
'cursor': 'https://www.cursor.com/',
|
|
13
|
+
'windsurf': 'https://codeium.com/windsurf',
|
|
14
|
+
'cline': 'https://github.com/cline/cline',
|
|
15
|
+
'trae': 'https://www.trae.ai/',
|
|
16
|
+
'gemini-cli': 'https://github.com/google-gemini/gemini-cli',
|
|
17
|
+
'augment': 'https://www.augmentcode.com/',
|
|
18
|
+
};
|
|
19
|
+
|
|
10
20
|
export interface StepAgentsProps {
|
|
11
21
|
agents: AgentEntry[];
|
|
12
22
|
agentsLoading: boolean;
|
|
@@ -79,10 +89,21 @@ export default function StepAgents({
|
|
|
79
89
|
{s.agentDetected}
|
|
80
90
|
</span>
|
|
81
91
|
);
|
|
92
|
+
const installUrl = AGENT_INSTALL_URLS[key];
|
|
82
93
|
return (
|
|
83
|
-
<span className="
|
|
84
|
-
|
|
85
|
-
|
|
94
|
+
<span className="flex items-center gap-1.5">
|
|
95
|
+
<span className="text-xs px-1.5 py-0.5 rounded"
|
|
96
|
+
style={{ background: 'color-mix(in srgb, var(--muted-foreground) 10%, transparent)', color: 'var(--muted-foreground)' }}>
|
|
97
|
+
{s.agentNotFound}
|
|
98
|
+
</span>
|
|
99
|
+
{installUrl && (
|
|
100
|
+
<a href={installUrl} target="_blank" rel="noopener noreferrer"
|
|
101
|
+
onClick={e => e.stopPropagation()}
|
|
102
|
+
className="text-2xs hover:underline"
|
|
103
|
+
style={{ color: 'var(--amber)' }}>
|
|
104
|
+
{s.agentGetIt}
|
|
105
|
+
</a>
|
|
106
|
+
)}
|
|
86
107
|
</span>
|
|
87
108
|
);
|
|
88
109
|
};
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { useState, useRef, useEffect, useCallback } from 'react';
|
|
4
4
|
import {
|
|
5
5
|
Loader2, AlertTriangle, CheckCircle2, XCircle, Copy, Check,
|
|
6
|
-
FolderOpen, Brain, Plug, Shield,
|
|
6
|
+
FolderOpen, Brain, Plug, Shield, Sparkles,
|
|
7
7
|
} from 'lucide-react';
|
|
8
8
|
import { copyToClipboard } from '@/lib/clipboard';
|
|
9
9
|
import { toast } from '@/lib/toast';
|
|
@@ -29,31 +29,52 @@ export function RestartBanner({ s }: { s: SetupMessages }) {
|
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
/** Restart button — shown in the bottom navigation bar (same position as Complete/Saving button) */
|
|
32
|
-
export function RestartButton({ s, newPort }: { s: SetupMessages; newPort: number }) {
|
|
32
|
+
export function RestartButton({ s, newPort, webPassword }: { s: SetupMessages; newPort: number; webPassword?: string }) {
|
|
33
33
|
const [restarting, setRestarting] = useState(false);
|
|
34
34
|
const [done, setDone] = useState(false);
|
|
35
35
|
const pollRef = useRef<ReturnType<typeof setInterval>>(undefined);
|
|
36
|
+
const delayRef = useRef<ReturnType<typeof setTimeout>>(undefined);
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
useEffect(() => () => { clearInterval(pollRef.current); }, []);
|
|
38
|
+
useEffect(() => () => { clearTimeout(delayRef.current); clearInterval(pollRef.current); }, []);
|
|
39
39
|
|
|
40
40
|
const handleRestart = async () => {
|
|
41
41
|
setRestarting(true);
|
|
42
42
|
try {
|
|
43
|
-
await fetch('/api/restart', { method: 'POST' });
|
|
43
|
+
const restartRes = await fetch('/api/restart', { method: 'POST' });
|
|
44
|
+
if (!restartRes.ok) throw new Error(`restart failed (${restartRes.status})`);
|
|
44
45
|
setDone(true);
|
|
45
|
-
const
|
|
46
|
-
|
|
46
|
+
const rawHost = window.location.hostname || 'localhost';
|
|
47
|
+
const host = rawHost.includes(':') ? `[${rawHost}]` : rawHost;
|
|
48
|
+
const baseUrl = `http://${host}:${newPort}`;
|
|
49
|
+
const redirect = () => { window.location.href = `${baseUrl}/?welcome=1`; };
|
|
50
|
+
|
|
47
51
|
let attempts = 0;
|
|
48
52
|
clearInterval(pollRef.current);
|
|
49
|
-
|
|
53
|
+
// Delay first poll to ensure the old server has been killed by `mindos restart`
|
|
54
|
+
const startPoll = () => { pollRef.current = setInterval(async () => {
|
|
50
55
|
attempts++;
|
|
51
56
|
try {
|
|
52
|
-
const r = await fetch(
|
|
53
|
-
if (r.status < 500) {
|
|
57
|
+
const r = await fetch(`${baseUrl}/api/health`);
|
|
58
|
+
if (r.status < 500) {
|
|
59
|
+
clearInterval(pollRef.current);
|
|
60
|
+
// Auto-authenticate so the user doesn't have to re-enter their password
|
|
61
|
+
if (webPassword) {
|
|
62
|
+
try {
|
|
63
|
+
await fetch(`${baseUrl}/api/auth`, {
|
|
64
|
+
method: 'POST',
|
|
65
|
+
headers: { 'Content-Type': 'application/json' },
|
|
66
|
+
body: JSON.stringify({ password: webPassword }),
|
|
67
|
+
credentials: 'include',
|
|
68
|
+
});
|
|
69
|
+
} catch { /* auth failed — user will see login page instead */ }
|
|
70
|
+
}
|
|
71
|
+
redirect();
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
54
74
|
} catch { /* not ready yet */ }
|
|
55
|
-
if (attempts >=
|
|
56
|
-
}, 800);
|
|
75
|
+
if (attempts >= 30) { clearInterval(pollRef.current); redirect(); }
|
|
76
|
+
}, 800); };
|
|
77
|
+
delayRef.current = setTimeout(startPoll, 2000);
|
|
57
78
|
} catch (e) {
|
|
58
79
|
console.warn('[SetupWizard] restart request failed:', e);
|
|
59
80
|
setRestarting(false);
|
|
@@ -91,14 +112,15 @@ export interface StepReviewProps {
|
|
|
91
112
|
error: string;
|
|
92
113
|
needsRestart: boolean;
|
|
93
114
|
s: SetupMessages;
|
|
94
|
-
setupPhase: 'review' | 'saving' | 'agents' | 'done';
|
|
115
|
+
setupPhase: 'review' | 'saving' | 'agents' | 'skills' | 'done';
|
|
95
116
|
cliEnabled: boolean;
|
|
96
117
|
mcpEnabled: boolean;
|
|
118
|
+
skillInstallStatus?: 'pending' | 'installing' | 'ok' | 'error' | 'skipped';
|
|
97
119
|
}
|
|
98
120
|
|
|
99
121
|
export default function StepReview({
|
|
100
122
|
state, selectedAgents, agentStatuses, onRetryAgent, error, needsRestart, s,
|
|
101
|
-
setupPhase, cliEnabled, mcpEnabled,
|
|
123
|
+
setupPhase, cliEnabled, mcpEnabled, skillInstallStatus = 'pending',
|
|
102
124
|
}: StepReviewProps) {
|
|
103
125
|
const failedAgents = Object.entries(agentStatuses).filter(([, v]) => v.state === 'error');
|
|
104
126
|
|
|
@@ -113,9 +135,11 @@ export default function StepReview({
|
|
|
113
135
|
// Progress stepper phases — dynamically built based on selected modes
|
|
114
136
|
type Phase = typeof setupPhase;
|
|
115
137
|
const showAgentPhase = mcpEnabled && selectedAgents.size > 0;
|
|
138
|
+
const showSkillPhase = selectedAgents.size > 0;
|
|
116
139
|
const phases: { key: Phase; label: string }[] = [
|
|
117
140
|
{ key: 'saving', label: s.phaseSaving },
|
|
118
141
|
...(showAgentPhase ? [{ key: 'agents' as Phase, label: s.phaseAgents }] : []),
|
|
142
|
+
...(showSkillPhase ? [{ key: 'skills' as Phase, label: s.phaseSkill ?? 'Installing skills' }] : []),
|
|
119
143
|
{ key: 'done', label: s.phaseDone },
|
|
120
144
|
];
|
|
121
145
|
const phaseOrder: Phase[] = phases.map(p => p.key);
|
|
@@ -213,6 +237,7 @@ export default function StepReview({
|
|
|
213
237
|
selectedAgents={selectedAgents}
|
|
214
238
|
agentStatuses={agentStatuses}
|
|
215
239
|
needsRestart={needsRestart}
|
|
240
|
+
skillInstallStatus={skillInstallStatus}
|
|
216
241
|
s={s}
|
|
217
242
|
/>
|
|
218
243
|
)}
|
|
@@ -222,12 +247,13 @@ export default function StepReview({
|
|
|
222
247
|
|
|
223
248
|
/* ── Health Check Summary ─────────────────────────────────────────────────── */
|
|
224
249
|
|
|
225
|
-
function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s }: {
|
|
250
|
+
function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s, skillInstallStatus = 'pending' }: {
|
|
226
251
|
state: SetupState;
|
|
227
252
|
selectedAgents: Set<string>;
|
|
228
253
|
agentStatuses: Record<string, AgentInstallStatus>;
|
|
229
254
|
needsRestart: boolean;
|
|
230
255
|
s: SetupMessages;
|
|
256
|
+
skillInstallStatus?: 'pending' | 'installing' | 'ok' | 'error' | 'skipped';
|
|
231
257
|
}) {
|
|
232
258
|
const [copied, setCopied] = useState(false);
|
|
233
259
|
|
|
@@ -251,6 +277,7 @@ function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s
|
|
|
251
277
|
const successAgents = Object.values(agentStatuses).filter(a => a.state === 'ok').length;
|
|
252
278
|
const agentsOk = successAgents > 0;
|
|
253
279
|
const hasToken = !!state.authToken;
|
|
280
|
+
const skillsOk = skillInstallStatus === 'ok';
|
|
254
281
|
|
|
255
282
|
// Resolve provider display name and model from dynamic config
|
|
256
283
|
let providerDisplayName = '';
|
|
@@ -295,6 +322,19 @@ function HealthCheckView({ state, selectedAgents, agentStatuses, needsRestart, s
|
|
|
295
322
|
: (s.healthAgentsNone ?? 'No agents configured'),
|
|
296
323
|
action: agentsOk ? undefined : (s.healthAgentsAction ?? 'You can add agents later in Settings → Connections.'),
|
|
297
324
|
},
|
|
325
|
+
...(selectedAgents.size > 0 ? [{
|
|
326
|
+
ok: skillsOk,
|
|
327
|
+
icon: <Sparkles size={14} />,
|
|
328
|
+
title: s.healthSkills ?? 'Skills',
|
|
329
|
+
detail: skillInstallStatus === 'ok'
|
|
330
|
+
? (s.healthSkillsOk ?? 'Skills installed successfully')
|
|
331
|
+
: skillInstallStatus === 'error'
|
|
332
|
+
? (s.healthSkillsError ?? 'Skill installation failed')
|
|
333
|
+
: skillInstallStatus === 'skipped'
|
|
334
|
+
? (s.healthSkillsSkipped ?? 'Skipped')
|
|
335
|
+
: (s.healthSkillsInstalling ?? 'Installing skills...'),
|
|
336
|
+
action: skillInstallStatus === 'error' ? (s.healthSkillsAction ?? 'You can install skills manually later.') : undefined,
|
|
337
|
+
}] : []),
|
|
298
338
|
];
|
|
299
339
|
|
|
300
340
|
return (
|
|
@@ -74,6 +74,12 @@ export function useAcpDetection(): AcpDetectionState {
|
|
|
74
74
|
setTrigger((n) => n + 1);
|
|
75
75
|
}, []);
|
|
76
76
|
|
|
77
|
+
useEffect(() => {
|
|
78
|
+
const onSettingsChanged = () => refresh();
|
|
79
|
+
window.addEventListener('mindos:settings-changed', onSettingsChanged);
|
|
80
|
+
return () => window.removeEventListener('mindos:settings-changed', onSettingsChanged);
|
|
81
|
+
}, [refresh]);
|
|
82
|
+
|
|
77
83
|
useEffect(() => {
|
|
78
84
|
const isForce = forceRef.current;
|
|
79
85
|
forceRef.current = false;
|
|
@@ -9,19 +9,25 @@ export function useSettingsAiAvailable(): { ready: boolean; loading: boolean } {
|
|
|
9
9
|
|
|
10
10
|
useEffect(() => {
|
|
11
11
|
let cancelled = false;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
const doFetch = () => {
|
|
13
|
+
fetch('/api/settings', { cache: 'no-store' })
|
|
14
|
+
.then((r) => r.json())
|
|
15
|
+
.then((d: SettingsJsonForAi) => {
|
|
16
|
+
if (!cancelled) setReady(isAiConfiguredForAsk(d));
|
|
17
|
+
})
|
|
18
|
+
.catch(() => {
|
|
19
|
+
if (!cancelled) setReady(false);
|
|
20
|
+
})
|
|
21
|
+
.finally(() => {
|
|
22
|
+
if (!cancelled) setLoading(false);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
doFetch();
|
|
26
|
+
const onChanged = () => doFetch();
|
|
27
|
+
window.addEventListener('mindos:settings-changed', onChanged);
|
|
23
28
|
return () => {
|
|
24
29
|
cancelled = true;
|
|
30
|
+
window.removeEventListener('mindos:settings-changed', onChanged);
|
|
25
31
|
};
|
|
26
32
|
}, []);
|
|
27
33
|
|
|
@@ -88,6 +88,7 @@ export const onboardingEn = {
|
|
|
88
88
|
agentNotInstalled: 'not installed',
|
|
89
89
|
agentDetected: 'detected',
|
|
90
90
|
agentNotFound: 'not found',
|
|
91
|
+
agentGetIt: 'Get it →',
|
|
91
92
|
agentStatusOk: 'configured',
|
|
92
93
|
agentStatusError: 'failed',
|
|
93
94
|
agentInstalling: 'Configuring…',
|
|
@@ -144,6 +145,12 @@ export const onboardingEn = {
|
|
|
144
145
|
healthAgentsPartial: 'Configuration in progress...',
|
|
145
146
|
healthAgentsNone: 'No agents configured',
|
|
146
147
|
healthAgentsAction: 'You can add agents later in Settings → Connections.',
|
|
148
|
+
healthSkills: 'Skills',
|
|
149
|
+
healthSkillsOk: 'Skills installed successfully',
|
|
150
|
+
healthSkillsError: 'Skill installation failed',
|
|
151
|
+
healthSkillsSkipped: 'Skipped',
|
|
152
|
+
healthSkillsInstalling: 'Installing skills...',
|
|
153
|
+
healthSkillsAction: 'You can install skills manually later.',
|
|
147
154
|
healthTokenTitle: 'Auth Token',
|
|
148
155
|
healthTokenCopy: 'Copy token',
|
|
149
156
|
healthTokenHint: 'Used by CLI remote mode and MCP connections. Also available in Settings → Connections.',
|
|
@@ -303,6 +310,7 @@ export const onboardingZh = {
|
|
|
303
310
|
agentNotInstalled: '未安装',
|
|
304
311
|
agentDetected: '已检测到',
|
|
305
312
|
agentNotFound: '未找到',
|
|
313
|
+
agentGetIt: '去安装 →',
|
|
306
314
|
agentStatusOk: '已配置',
|
|
307
315
|
agentStatusError: '失败',
|
|
308
316
|
agentInstalling: '配置中…',
|
|
@@ -359,6 +367,12 @@ export const onboardingZh = {
|
|
|
359
367
|
healthAgentsPartial: '正在配置中...',
|
|
360
368
|
healthAgentsNone: '未配置 Agent',
|
|
361
369
|
healthAgentsAction: '可稍后在 设置 → 连接 中添加。',
|
|
370
|
+
healthSkills: 'Skills',
|
|
371
|
+
healthSkillsOk: 'Skill 安装成功',
|
|
372
|
+
healthSkillsError: 'Skill 安装失败',
|
|
373
|
+
healthSkillsSkipped: '已跳过',
|
|
374
|
+
healthSkillsInstalling: '正在安装 Skill…',
|
|
375
|
+
healthSkillsAction: '可稍后手动安装 Skill。',
|
|
362
376
|
healthTokenTitle: '认证令牌',
|
|
363
377
|
healthTokenCopy: '复制令牌',
|
|
364
378
|
healthTokenHint: 'CLI 远程模式和 MCP 连接时使用。也可在 设置 → 连接 中找到。',
|