@ppdocs/mcp 2.8.2 → 2.8.3
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/dist/tools/helpers.js +1 -1
- package/dist/tools/index.js +2 -2
- package/package.json +1 -1
package/dist/tools/helpers.js
CHANGED
|
@@ -55,7 +55,7 @@ export function formatTreeText(tree) {
|
|
|
55
55
|
const connector = isLast ? '└── ' : '├── ';
|
|
56
56
|
const childPrefix = isLast ? ' ' : '│ ';
|
|
57
57
|
const icon = node.isDir ? '📁' : '📄';
|
|
58
|
-
const summary = node.summary ? `
|
|
58
|
+
const summary = node.summary ? `(${node.summary})` : '';
|
|
59
59
|
lines.push(`${prefix}${connector}${icon} ${node.name}${summary}`);
|
|
60
60
|
if (node.children && node.children.length > 0) {
|
|
61
61
|
lines.push(...format(node.children, prefix + childPrefix));
|
package/dist/tools/index.js
CHANGED
|
@@ -23,8 +23,8 @@ export function registerTools(server, projectId, _user) {
|
|
|
23
23
|
});
|
|
24
24
|
return wrap(`✅ 文档已创建: ${decoded.path}\n\n${JSON.stringify(doc, null, 2)}`);
|
|
25
25
|
});
|
|
26
|
-
// 2.
|
|
27
|
-
server.tool('kg_delete_node', '
|
|
26
|
+
// 2. 删除文档或目录 (支持批量)
|
|
27
|
+
server.tool('kg_delete_node', '删除文档或目录(支持批量,根不可删除,目录会递归删除)', { nodeId: z.union([z.string(), z.array(z.string())]).describe('文档路径或路径数组') }, async (args) => {
|
|
28
28
|
const paths = Array.isArray(args.nodeId) ? args.nodeId : [args.nodeId];
|
|
29
29
|
const results = [];
|
|
30
30
|
for (const path of paths) {
|