@geminilight/mindos 0.5.70 → 0.6.1
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/app/app/api/ask/route.ts +124 -92
- package/app/app/api/mcp/agents/route.ts +53 -2
- package/app/app/api/mcp/status/route.ts +1 -1
- package/app/app/api/skills/route.ts +10 -114
- package/app/components/ActivityBar.tsx +3 -4
- package/app/components/CreateSpaceModal.tsx +31 -6
- package/app/components/FileTree.tsx +33 -2
- package/app/components/GuideCard.tsx +197 -131
- package/app/components/HomeContent.tsx +85 -18
- package/app/components/SidebarLayout.tsx +13 -0
- package/app/components/SpaceInitToast.tsx +173 -0
- package/app/components/agents/AgentDetailContent.tsx +32 -17
- package/app/components/agents/AgentsContentPage.tsx +2 -1
- package/app/components/agents/AgentsOverviewSection.tsx +1 -14
- package/app/components/agents/agents-content-model.ts +16 -8
- package/app/components/ask/AskContent.tsx +137 -50
- package/app/components/ask/MentionPopover.tsx +16 -8
- package/app/components/ask/SlashCommandPopover.tsx +62 -0
- package/app/components/settings/KnowledgeTab.tsx +61 -0
- package/app/components/walkthrough/steps.ts +11 -6
- package/app/hooks/useMention.ts +14 -6
- package/app/hooks/useSlashCommand.ts +114 -0
- package/app/lib/actions.ts +79 -2
- package/app/lib/agent/index.ts +1 -1
- package/app/lib/agent/prompt.ts +2 -0
- package/app/lib/agent/tools.ts +106 -0
- package/app/lib/core/create-space.ts +11 -4
- package/app/lib/core/index.ts +1 -1
- package/app/lib/i18n-en.ts +51 -46
- package/app/lib/i18n-zh.ts +50 -45
- package/app/lib/mcp-agents.ts +8 -0
- package/app/lib/pdf-extract.ts +33 -0
- package/app/lib/pi-integration/extensions.ts +68 -0
- package/app/lib/pi-integration/mcporter.ts +219 -0
- package/app/lib/pi-integration/session-store.ts +62 -0
- package/app/lib/pi-integration/skills.ts +116 -0
- package/app/lib/settings.ts +1 -1
- package/app/next-env.d.ts +1 -1
- package/app/next.config.ts +1 -1
- package/app/package.json +2 -0
- package/mcp/src/index.ts +29 -0
- package/package.json +1 -1
package/app/lib/settings.ts
CHANGED
|
@@ -32,7 +32,7 @@ export interface GuideState {
|
|
|
32
32
|
step1Done: boolean; // 至少浏览过 1 个文件
|
|
33
33
|
askedAI: boolean; // 至少发过 1 条 AI 消息
|
|
34
34
|
nextStepIndex: number; // 0=C2, 1=C3, 2=C4, 3=全部完成
|
|
35
|
-
walkthroughStep?: number; //
|
|
35
|
+
walkthroughStep?: number; // undefined=not started, 0-3=current step, 4=completed
|
|
36
36
|
walkthroughDismissed?: boolean; // user skipped walkthrough
|
|
37
37
|
}
|
|
38
38
|
|
package/app/next-env.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="next" />
|
|
2
2
|
/// <reference types="next/image-types/global" />
|
|
3
|
-
import "./.next/types/routes.d.ts";
|
|
3
|
+
import "./.next/dev/types/routes.d.ts";
|
|
4
4
|
|
|
5
5
|
// NOTE: This file should not be edited
|
|
6
6
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
package/app/next.config.ts
CHANGED
|
@@ -3,7 +3,7 @@ import path from "path";
|
|
|
3
3
|
|
|
4
4
|
const nextConfig: NextConfig = {
|
|
5
5
|
transpilePackages: ['github-slugger'],
|
|
6
|
-
serverExternalPackages: ['chokidar', 'openai', '@mariozechner/pi-ai', '@mariozechner/pi-agent-core'],
|
|
6
|
+
serverExternalPackages: ['chokidar', 'openai', '@mariozechner/pi-ai', '@mariozechner/pi-agent-core', '@mariozechner/pi-coding-agent', 'mcporter'],
|
|
7
7
|
output: 'standalone',
|
|
8
8
|
outputFileTracingRoot: path.join(__dirname),
|
|
9
9
|
turbopack: {
|
package/app/package.json
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@codemirror/view": "^6.39.16",
|
|
20
20
|
"@mariozechner/pi-agent-core": "^0.60.0",
|
|
21
21
|
"@mariozechner/pi-ai": "^0.60.0",
|
|
22
|
+
"@mariozechner/pi-coding-agent": "^0.61.1",
|
|
22
23
|
"@sinclair/typebox": "^0.34.33",
|
|
23
24
|
"@tiptap/extension-image": "^3.20.1",
|
|
24
25
|
"@tiptap/extension-link": "^3.20.1",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"github-slugger": "^2.0.0",
|
|
41
42
|
"lucide-react": "^0.577.0",
|
|
42
43
|
"nanoid": "^5.1.0",
|
|
44
|
+
"mcporter": "^0.7.3",
|
|
43
45
|
"next": "16.1.6",
|
|
44
46
|
"papaparse": "^5.5.3",
|
|
45
47
|
"pdfjs-dist": "^4.10.38",
|
package/mcp/src/index.ts
CHANGED
|
@@ -203,6 +203,35 @@ server.registerTool("mindos_create_file", {
|
|
|
203
203
|
} catch (e) { logOp("mindos_create_file", { path }, "error", String(e)); return error(String(e)); }
|
|
204
204
|
});
|
|
205
205
|
|
|
206
|
+
// ── mindos_batch_create_files ────────────────────────────────────────────────
|
|
207
|
+
|
|
208
|
+
server.registerTool("mindos_batch_create_files", {
|
|
209
|
+
title: "Batch Create Files",
|
|
210
|
+
description:
|
|
211
|
+
"Create multiple new files in a single operation. Only .md and .csv files allowed. Returns a summary of created files and any errors.",
|
|
212
|
+
inputSchema: z.object({
|
|
213
|
+
files: z.array(z.object({
|
|
214
|
+
path: z.string().min(1).regex(/\.(md|csv)$/).describe("Relative file path (must end in .md or .csv)"),
|
|
215
|
+
content: z.string().default("").describe("Initial file content"),
|
|
216
|
+
})).min(1).max(50).describe("List of files to create (max 50 per call)"),
|
|
217
|
+
}),
|
|
218
|
+
}, async ({ files }) => {
|
|
219
|
+
const created: string[] = [];
|
|
220
|
+
const errors: string[] = [];
|
|
221
|
+
for (const file of files) {
|
|
222
|
+
try {
|
|
223
|
+
await post("/api/file", { op: "create_file", path: file.path, content: file.content });
|
|
224
|
+
created.push(file.path);
|
|
225
|
+
} catch (e) {
|
|
226
|
+
errors.push(`${file.path}: ${String(e)}`);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
let msg = `Batch creation complete.\nCreated ${created.length} file(s): ${created.join(", ")}`;
|
|
230
|
+
if (errors.length > 0) msg += `\n\nFailed to create ${errors.length} file(s):\n${errors.join("\n")}`;
|
|
231
|
+
logOp("mindos_batch_create_files", { count: files.length }, created.length === files.length ? "ok" : "error", msg.slice(0, 200));
|
|
232
|
+
return created.length === files.length ? ok(msg) : error(msg);
|
|
233
|
+
});
|
|
234
|
+
|
|
206
235
|
// ── mindos_create_space ─────────────────────────────────────────────────────
|
|
207
236
|
|
|
208
237
|
server.registerTool("mindos_create_space", {
|
package/package.json
CHANGED