@geminilight/mindos 0.5.63 → 0.5.65
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/README.md +4 -0
- package/README_zh.md +4 -0
- package/app/app/api/ask/route.ts +12 -0
- package/app/app/api/changes/route.ts +7 -1
- package/app/app/api/file/route.ts +9 -0
- package/app/app/api/mcp/agents/route.ts +27 -1
- package/app/app/api/mcp/install-skill/route.ts +9 -24
- package/app/app/api/skills/route.ts +18 -2
- package/app/app/api/tree-version/route.ts +8 -0
- package/app/app/layout.tsx +1 -0
- package/app/app/page.tsx +1 -2
- package/app/app/view/[...path]/ViewPageClient.tsx +0 -1
- package/app/components/ActivityBar.tsx +2 -2
- package/app/components/Backlinks.tsx +5 -5
- package/app/components/CreateSpaceModal.tsx +3 -2
- package/app/components/DirPicker.tsx +1 -1
- package/app/components/DirView.tsx +2 -3
- package/app/components/EditorWrapper.tsx +3 -3
- package/app/components/FileTree.tsx +25 -10
- package/app/components/GuideCard.tsx +4 -4
- package/app/components/HomeContent.tsx +44 -14
- package/app/components/MarkdownView.tsx +2 -2
- package/app/components/OnboardingView.tsx +1 -1
- package/app/components/Panel.tsx +1 -1
- package/app/components/RightAgentDetailPanel.tsx +2 -1
- package/app/components/RightAskPanel.tsx +1 -1
- package/app/components/SearchModal.tsx +10 -2
- package/app/components/SidebarLayout.tsx +36 -10
- package/app/components/ThemeToggle.tsx +1 -1
- package/app/components/agents/AgentDetailContent.tsx +454 -59
- package/app/components/agents/AgentsContentPage.tsx +89 -20
- package/app/components/agents/AgentsMcpSection.tsx +513 -85
- package/app/components/agents/AgentsOverviewSection.tsx +418 -59
- package/app/components/agents/AgentsPrimitives.tsx +335 -0
- package/app/components/agents/AgentsSkillsSection.tsx +746 -105
- package/app/components/agents/SkillDetailPopover.tsx +416 -0
- package/app/components/agents/agents-content-model.ts +308 -10
- package/app/components/ask/AskContent.tsx +34 -5
- package/app/components/ask/FileChip.tsx +1 -0
- package/app/components/ask/MentionPopover.tsx +13 -1
- package/app/components/ask/MessageList.tsx +5 -7
- package/app/components/ask/ToolCallBlock.tsx +4 -4
- package/app/components/changes/ChangesBanner.tsx +89 -13
- package/app/components/changes/ChangesContentPage.tsx +134 -51
- package/app/components/echo/EchoHero.tsx +10 -24
- package/app/components/echo/EchoInsightCollapsible.tsx +52 -43
- package/app/components/echo/EchoPageSections.tsx +13 -9
- package/app/components/echo/EchoSegmentNav.tsx +14 -11
- package/app/components/echo/EchoSegmentPageClient.tsx +64 -43
- package/app/components/explore/ExploreContent.tsx +3 -7
- package/app/components/explore/UseCaseCard.tsx +4 -15
- package/app/components/panels/AgentsPanel.tsx +22 -128
- package/app/components/panels/AgentsPanelAgentDetail.tsx +7 -6
- package/app/components/panels/AgentsPanelAgentGroups.tsx +8 -13
- package/app/components/panels/AgentsPanelAgentListRow.tsx +39 -16
- package/app/components/panels/AgentsPanelHubNav.tsx +12 -12
- package/app/components/panels/EchoPanel.tsx +8 -10
- package/app/components/panels/PanelNavRow.tsx +9 -2
- package/app/components/panels/PluginsPanel.tsx +5 -5
- package/app/components/renderers/agent-inspector/AgentInspectorRenderer.tsx +30 -8
- package/app/components/renderers/agent-inspector/manifest.ts +5 -3
- package/app/components/renderers/config/manifest.ts +1 -0
- package/app/components/renderers/csv/manifest.ts +1 -0
- package/app/components/renderers/todo/manifest.ts +1 -0
- package/app/components/settings/AiTab.tsx +3 -3
- package/app/components/settings/AppearanceTab.tsx +2 -2
- package/app/components/settings/KnowledgeTab.tsx +3 -3
- package/app/components/settings/McpAgentInstall.tsx +3 -6
- package/app/components/settings/McpSkillCreateForm.tsx +2 -3
- package/app/components/settings/McpSkillRow.tsx +2 -3
- package/app/components/settings/McpSkillsSection.tsx +2 -2
- package/app/components/settings/McpTab.tsx +12 -13
- package/app/components/settings/MonitoringTab.tsx +13 -13
- package/app/components/settings/PluginsTab.tsx +6 -5
- package/app/components/settings/Primitives.tsx +3 -4
- package/app/components/settings/SettingsContent.tsx +3 -3
- package/app/components/settings/SyncTab.tsx +11 -17
- package/app/components/settings/UpdateTab.tsx +18 -21
- package/app/components/settings/types.ts +14 -0
- package/app/components/setup/StepKB.tsx +1 -1
- package/app/hooks/useMcpData.tsx +7 -4
- package/app/hooks/useMention.ts +25 -8
- package/app/lib/agent/log.ts +15 -18
- package/app/lib/agent/stream-consumer.ts +3 -0
- package/app/lib/agent/to-agent-messages.ts +6 -4
- package/app/lib/core/agent-audit-log.ts +280 -0
- package/app/lib/core/content-changes.ts +148 -8
- package/app/lib/core/index.ts +11 -0
- package/app/lib/fs.ts +16 -1
- package/app/lib/i18n-en.ts +317 -36
- package/app/lib/i18n-zh.ts +316 -35
- package/app/lib/mcp-agents.ts +273 -2
- package/app/lib/renderers/index.ts +1 -2
- package/app/lib/renderers/registry.ts +10 -0
- package/app/lib/types.ts +2 -0
- package/app/next-env.d.ts +1 -1
- package/bin/lib/mcp-agents.js +38 -13
- package/package.json +1 -1
- package/scripts/migrate-agent-audit-log.js +170 -0
- package/scripts/migrate-agent-diff.js +146 -0
- package/scripts/setup.js +12 -17
- package/skills/plugin-core-builtin-migration/SKILL.md +178 -0
- package/app/components/renderers/diff/DiffRenderer.tsx +0 -311
- package/app/components/renderers/diff/manifest.ts +0 -14
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { useMemo, useState } from 'react';
|
|
4
|
-
import Link from 'next/link';
|
|
5
4
|
import { useLocale } from '@/lib/LocaleContext';
|
|
6
5
|
import { useMcpData } from '@/hooks/useMcpData';
|
|
7
6
|
import { copyToClipboard } from '@/lib/clipboard';
|
|
@@ -20,6 +19,24 @@ export default function AgentsContentPage({ tab }: { tab: AgentsDashboardTab })
|
|
|
20
19
|
const a = t.agentsContent;
|
|
21
20
|
const mcp = useMcpData();
|
|
22
21
|
const [copyState, setCopyState] = useState<string | null>(null);
|
|
22
|
+
const pageHeader = useMemo(() => {
|
|
23
|
+
if (tab === 'skills') {
|
|
24
|
+
return {
|
|
25
|
+
title: a.navSkills,
|
|
26
|
+
subtitle: a.skills.capabilityGroups,
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (tab === 'mcp') {
|
|
30
|
+
return {
|
|
31
|
+
title: a.navMcp,
|
|
32
|
+
subtitle: a.mcp.connectionGraph,
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
title: a.title,
|
|
37
|
+
subtitle: a.subtitle,
|
|
38
|
+
};
|
|
39
|
+
}, [a, tab]);
|
|
23
40
|
|
|
24
41
|
const buckets = useMemo(() => bucketAgents(mcp.agents), [mcp.agents]);
|
|
25
42
|
const riskQueue = useMemo(
|
|
@@ -32,13 +49,10 @@ export default function AgentsContentPage({ tab }: { tab: AgentsDashboardTab })
|
|
|
32
49
|
}),
|
|
33
50
|
[mcp.skills, mcp.status?.running, buckets.detected.length, buckets.notFound.length],
|
|
34
51
|
);
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
? 'border-border bg-[var(--amber-dim)] text-[var(--amber)]'
|
|
40
|
-
: 'border-border text-muted-foreground hover:text-foreground hover:bg-muted'
|
|
41
|
-
}`;
|
|
52
|
+
const enabledSkillCount = useMemo(
|
|
53
|
+
() => mcp.skills.filter((skill) => skill.enabled).length,
|
|
54
|
+
[mcp.skills],
|
|
55
|
+
);
|
|
42
56
|
|
|
43
57
|
const copySnippet = async (agentKey: string) => {
|
|
44
58
|
const agent = mcp.agents.find((item) => item.key === agentKey);
|
|
@@ -53,25 +67,24 @@ export default function AgentsContentPage({ tab }: { tab: AgentsDashboardTab })
|
|
|
53
67
|
return (
|
|
54
68
|
<div className="content-width px-4 md:px-6 py-8 md:py-10">
|
|
55
69
|
<header className="mb-6">
|
|
56
|
-
<h1 className="text-2xl font-semibold tracking-tight font-display text-foreground">{
|
|
57
|
-
<p className="mt-1 text-sm text-muted-foreground">{
|
|
70
|
+
<h1 className="text-2xl font-semibold tracking-tight font-display text-foreground">{pageHeader.title}</h1>
|
|
71
|
+
<p className="mt-1 text-sm text-muted-foreground">{pageHeader.subtitle}</p>
|
|
58
72
|
</header>
|
|
59
73
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
<Link href="/agents?tab=mcp" role="tab" id="agents-tab-mcp" aria-controls="agents-panel-mcp" aria-selected={tab === 'mcp'} className={navClass('mcp')}>{a.navMcp}</Link>
|
|
63
|
-
<Link href="/agents?tab=skills" role="tab" id="agents-tab-skills" aria-controls="agents-panel-skills" aria-selected={tab === 'skills'} className={navClass('skills')}>{a.navSkills}</Link>
|
|
64
|
-
</div>
|
|
74
|
+
{/* Loading skeleton — shown while initial data loads */}
|
|
75
|
+
{mcp.loading && tab === 'overview' && <OverviewSkeleton />}
|
|
65
76
|
|
|
66
|
-
{tab === 'overview' && (
|
|
77
|
+
{!mcp.loading && tab === 'overview' && (
|
|
67
78
|
<AgentsOverviewSection
|
|
68
79
|
copy={a.overview}
|
|
69
80
|
buckets={buckets}
|
|
70
81
|
riskQueue={riskQueue}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
82
|
+
mcpRunning={!!mcp.status?.running}
|
|
83
|
+
mcpPort={mcp.status?.port ?? null}
|
|
84
|
+
mcpToolCount={mcp.status?.toolCount ?? 0}
|
|
85
|
+
enabledSkillCount={enabledSkillCount}
|
|
86
|
+
allAgents={mcp.agents}
|
|
87
|
+
pulseCopy={a.workspacePulse}
|
|
75
88
|
/>
|
|
76
89
|
)}
|
|
77
90
|
|
|
@@ -85,3 +98,59 @@ export default function AgentsContentPage({ tab }: { tab: AgentsDashboardTab })
|
|
|
85
98
|
</div>
|
|
86
99
|
);
|
|
87
100
|
}
|
|
101
|
+
|
|
102
|
+
/* ────────── Loading skeleton for Overview ────────── */
|
|
103
|
+
|
|
104
|
+
function OverviewSkeleton() {
|
|
105
|
+
return (
|
|
106
|
+
<div className="space-y-5 animate-pulse" aria-busy="true" aria-label="Loading">
|
|
107
|
+
{/* Stats bar skeleton */}
|
|
108
|
+
<div className="rounded-xl border border-border bg-card overflow-hidden">
|
|
109
|
+
<div className="px-4 py-2.5 border-b border-border bg-muted/10">
|
|
110
|
+
<div className="h-4 w-32 bg-muted rounded" />
|
|
111
|
+
</div>
|
|
112
|
+
<div className="grid grid-cols-3 md:grid-cols-6 divide-x divide-border">
|
|
113
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
114
|
+
<div key={i} className="px-3 py-3.5 flex flex-col items-center gap-2">
|
|
115
|
+
<div className="h-3 w-16 bg-muted rounded" />
|
|
116
|
+
<div className="h-5 w-8 bg-muted rounded" />
|
|
117
|
+
</div>
|
|
118
|
+
))}
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
{/* Quick nav skeleton */}
|
|
123
|
+
<div className="grid grid-cols-1 md:grid-cols-2 gap-3">
|
|
124
|
+
{Array.from({ length: 2 }).map((_, i) => (
|
|
125
|
+
<div key={i} className="rounded-xl border border-border bg-card p-4 flex items-start gap-3.5">
|
|
126
|
+
<div className="w-10 h-10 rounded-lg bg-muted" />
|
|
127
|
+
<div className="flex-1 space-y-2">
|
|
128
|
+
<div className="h-4 w-20 bg-muted rounded" />
|
|
129
|
+
<div className="h-3 w-full bg-muted rounded" />
|
|
130
|
+
</div>
|
|
131
|
+
</div>
|
|
132
|
+
))}
|
|
133
|
+
</div>
|
|
134
|
+
|
|
135
|
+
{/* Agent cards skeleton */}
|
|
136
|
+
<div>
|
|
137
|
+
<div className="flex items-center justify-between mb-3">
|
|
138
|
+
<div className="h-4 w-24 bg-muted rounded" />
|
|
139
|
+
<div className="h-3 w-16 bg-muted rounded" />
|
|
140
|
+
</div>
|
|
141
|
+
<div className="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3">
|
|
142
|
+
{Array.from({ length: 6 }).map((_, i) => (
|
|
143
|
+
<div key={i} className="rounded-xl border border-border bg-card p-3.5">
|
|
144
|
+
<div className="flex items-center gap-2.5 mb-3">
|
|
145
|
+
<div className="w-7 h-7 rounded-full bg-muted" />
|
|
146
|
+
<div className="flex-1 h-4 bg-muted rounded" />
|
|
147
|
+
<div className="h-4 w-16 bg-muted rounded" />
|
|
148
|
+
</div>
|
|
149
|
+
<div className="h-3 w-2/3 bg-muted rounded" />
|
|
150
|
+
</div>
|
|
151
|
+
))}
|
|
152
|
+
</div>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
);
|
|
156
|
+
}
|