@gui-chat-plugin/mindmap

中文文档
2.1.0发布于 2026/10/18MITTypeScriptESM + CJS近 30 天下载 4979

视觉集思广益交互式思维图插件Name

中文使用文档
文档目录13 节
  1. 特征
  2. 安装
  3. 使用量
  4. Vue 整合
  5. 反应集成
  6. 仅使用核心
  7. API 密码
  8. 心电图
  9. 行动
  10. 测试提示
  11. 发展
  12. 许可证
  13. 相关

@ gui-chat- plugin/ mindmap (英语)

npm version scoria

用于 GUI Chat 应用程序的互动心智图插件. 为集思广益和思想组织制作视觉心智图.

特征

  • 创建带有中心想法和分支节点的思维图
  • 交互添加、删除和连接节点
  • 带有再平衡功能的自动放出
  • 导出到 PNG 和 PDF
  • Vue 和 React 支持

安装

yarn add @gui-chat-plugin/mindmap gui-chat-protocol

gui-chat-protocol 是一个对等的依赖性——与插件一起安装;主机应用程序提供运行时间,这个插件只宣布相容范围.

使用量

Vue 整合

// In src/tools/index.ts
import MindMapPlugin from "@gui-chat-plugin/mindmap/vue";

const pluginList = [
  // ... other plugins
  MindMapPlugin,
];

// In src/main.ts
import "@gui-chat-plugin/mindmap/style.css";

反应集成

import MindMapPlugin from "@gui-chat-plugin/mindmap/react";
import "@gui-chat-plugin/mindmap/style.css";

仅使用核心

import { executeMindMap, TOOL_DEFINITION } from "@gui-chat-plugin/mindmap";

// Create a mind map
const result = await executeMindMap(context, {
  action: "create",
  title: "Project Ideas",
  centralIdea: "New Product",
  ideas: ["Feature A", "Feature B", "Feature C"],
});

// Nest `ideas` to build every level in one call — the only way to get a
// multi-level map on hosts that keep no mind map state between calls
const tree = await executeMindMap(context, {
  action: "create",
  title: "Revenue",
  centralIdea: "Revenue",
  ideas: [
    { text: "Marketing", children: [{ text: "SNS", children: [{ text: "X" }] }, { text: "Ads" }] },
    "Sales",
  ],
});

context 也许 null 编号 : undefined ——没有客户端状态的东道主(an MCP/服务器桥)可以调用 executeMindMap 没有上下文。 行动 需要一个已有的地图然后查看 existingMap 在坐标中,返回一个 如果无需要编辑,则会出现错误.

API 密码

心电图

// A branch: a plain label, or a label with nested branches (any depth)
type IdeaInput = string | { text: string; children?: IdeaInput[] };

interface MindMapArgs {
  action: "create" | "add_node" | "delete_node" | "connect" | "update" | "rebalance";
  title?: string;           // Title of the mind map
  centralIdea?: string;     // Central idea for new mind map
  ideas?: IdeaInput[];      // Branches of the central idea, nestable
  parentNodeId?: string;    // Parent node for add_node — node ID or label text
  newIdea?: string;         // New idea text for add_node
  nodeIdToDelete?: string;  // Node to delete — node ID or label text
  fromNodeId?: string;      // Source node for connection — node ID or label text
  toNodeId?: string;        // Target node for connection — node ID or label text
  connectionLabel?: string; // Label for connection
}

节点引用要么接受生成的节点ID,要么接受节点的标签. A 类 标签以不区分大小写方式匹配:先准确的文本,然后是子字符串。 如果是 匹配任何内容——或几个节点——调用返回错误结果列表 地图的标签,并留下地图未被更改.

行动

行动说明
create创建一个带有中心思想和分支的新思维图(已删除) ideas 构建整个等级体系)
add_node将新节点添加为已存在的节点的子节点
delete_node删除节点及其子
connect在两个节点之间创建连接
update更新已有的心智图
rebalance改进布局的自动安排节点

测试提示

尝试这些提示测试插件 :

  1. "创造关于项目规划的心灵地图"
  2. "在心灵地图上添加关于营销的新想法"
  3. "连接设计开发节点"

发展

# Install dependencies
yarn install

# Run Vue demo
yarn dev

# Run React demo
yarn dev:react

# Build
yarn build

# Lint
yarn lint

# Test
yarn test

许可证

麻省理工学院

版本与发布记录

@gui-chat-plugin/mindmap 共发布 12 个版本,首次发布于 2026/01/25;过去 12 个月发布了 12 个版本。

版本发布日期距今
2.1.0latest2026/10/1830 天前
2.0.02026/08/033 个月前
1.2.12026/08/033 个月前
1.2.02026/08/033 个月前
1.1.02026/07/243 个月前
1.0.02026/07/233 个月前

关于 @gui-chat-plugin/mindmap 的常见问题

@gui-chat-plugin/mindmap 是什么?

视觉集思广益交互式思维图插件Name

如何安装 @gui-chat-plugin/mindmap?

在项目目录运行 npm install @gui-chat-plugin/mindmap,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:gui-chat-protocol(^2.3.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@gui-chat-plugin/mindmap 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@gui-chat-plugin/mindmap 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@gui-chat-plugin/mindmap 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@gui-chat-plugin/mindmap 可以商用吗?

@gui-chat-plugin/mindmap 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@gui-chat-plugin/mindmap 的下载量有多少?

根据 npm 官方下载统计,@gui-chat-plugin/mindmap 在 2026/10/17 – 2026/11/15 这 30 天内被下载 4,979 次,日均约 166 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@gui-chat-plugin/mindmap 还在维护吗?

最新版本 2.1.0 发布于 2026/10/18(30 天前);至今共发布 12 个版本,其中过去 12 个月发布了 12 个;首次发布于 2026/01/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。