feat(smart-mind-map-tool): initial release v1.0.0 with adaptive Rich UI

This commit is contained in:
fujie
2026-03-04 23:14:06 +08:00
parent eda495e55f
commit 56a6ddd422
36 changed files with 3550 additions and 187 deletions

View File

@@ -5,3 +5,4 @@ OpenWebUI native Tool plugins that can be used across models.
## Available Tool Plugins
- [OpenWebUI Skills Manager Tool](openwebui-skills-manager-tool.md) (v0.2.1) - Simple native skill management (`list/show/install/create/update/delete`).
- [Smart Mind Map Tool](smart-mind-map-tool.md) (v1.0.0) - Intelligently analyzes text content and proactively generates interactive mind maps to help users structure and visualize knowledge.

View File

@@ -5,3 +5,4 @@
## 可用 Tool 插件
- [OpenWebUI Skills 管理工具](openwebui-skills-manager-tool.zh.md) (v0.2.1) - 简化技能管理(`list/show/install/create/update/delete`)。
- [智能思维导图工具 (Smart Mind Map Tool)](smart-mind-map-tool.zh.md) (v1.0.0) - 智能分析文本内容并主动生成交互式思维导图,帮助用户结构化与可视化知识。

View File

@@ -0,0 +1,62 @@
# Smart Mind Map Tool - Knowledge Visualization & Structuring
Smart Mind Map Tool is the tool version of the popular Smart Mind Map plugin for OpenWebUI. It allows the model to proactively generate interactive mind maps during conversations by intelligently analyzing context and structuring knowledge into visual hierarchies.
> **Note**: Prefer the manual trigger button instead? Check out the [Smart Mind Map Action Version](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a) here.
**Author:** [Fu-Jie](https://github.com/Fu-Jie) | **Version:** 1.0.0 | **Project:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **License:** MIT
---
## 🚀 Why is there a Tool version?
1. **Powered by OpenWebUI 0.8.0 Rich UI**: Previous versions of OpenWebUI did not support embedding custom HTML/iframes directly into the chat stream. Starting with 0.8.0, the platform introduced full Rich UI rendering support for **both Actions and Tools**, unleashing interactive frontend possibilities.
2. **AI Autonomous Invocation (vs. Action)**: While an **Action** is passive and requires a manual button click from the user, the **Tool** version gives the model **autonomy**. The AI can analyze the conversational context and decide on its own exactly when generating a mind map would be most helpful, offering a true "smart assistant" experience.
It is perfect for:
- Summarizing complex discussions.
- Planning projects or outlining articles.
- Explaining hierarchical concepts.
## ✨ Key Features
-**Proactive Generation**: The AI triggers the tool automatically when it senses a need for structured visualization.
-**Full Context Awareness**: Supports aggregation of the entire conversation history to generate comprehensive knowledge maps.
-**Native Multi-language UI (i18n)**: Automatically detects and adapts to your browser/system language (en-US, zh-CN, ja-JP, etc.).
-**Premium UI/UX**: Matches the Action version with a compact toolbar, glassmorphism aesthetics, and professional borders.
-**Interactive Controls**: Zoom (In/Out/Reset), Level-based expansion (Default to Level 3), and Fullscreen mode.
-**High-Quality Export**: Export your mind maps as print-ready PNG images.
## 🛠️ Installation & Setup
1. **Install**: Upload `smart_mind_map_tool.py` to your OpenWebUI Admin Settings -> Plugins -> Tools.
2. **Enable Native Tool Calling**: Navigate to `Admin Settings -> Models` or your workspace settings, and ensure that **Native Tool Calling** is enabled for your selected model. This is required for the AI to reliably and actively invoke the tool automatically.
3. **Assign**: Toggle the tool "ON" for your desired models in the workspace or model settings.
4. **Configure**:
- `MESSAGE_COUNT`: Set to `12` (default) to use the 12 most recent messages, or `0` for the entire conversation history.
- `MODEL_ID`: Specify a preferred model for analysis (defaults to the current chat model).
## ⚙️ Configuration (Valves)
| Parameter | Default | Description |
| :--- | :--- | :--- |
| `MODEL_ID` | (Empty) | The model used for text analysis. If empty, uses the current chat model. |
| `MESSAGE_COUNT` | `12` | Number of messages to aggregate. `0` = All messages. |
| `MIN_TEXT_LENGTH` | `100` | Minimum character count required to trigger a mind map. |
## ❓ FAQ & Troubleshooting
- **Language mismatch?**: The tool uses a 4-level detection (Frontend Script > Browser Header > User Profile > Default). Ensure your browser language is set correctly.
- **Too tiny or too large?**: We've optimized the height to `500px` for inline chat display with a responsive "Fit to Screen" logic.
- **Exporting**: Click the "⛶" for fullscreen if you want a wider view before exporting to PNG.
---
## ⭐ Support
If this tool helps you visualize ideas better, please give us a star on [GitHub](https://github.com/Fu-Jie/openwebui-extensions).
## ⚖️ License
MIT License. Developed with ❤️ by Fu-Jie.

View File

@@ -0,0 +1,62 @@
# 思维导图工具 - 知识可视化与结构化利器
思维导图工具Smart Mind Map Tool是广受好评的“思维导图”插件的工具Tool版本。它赋予了模型主动生成交互式思维导图的能力通过智能分析上下文将碎片化知识转化为层级分明的视觉架构。
> **说明**:如果您更倾向于手动点击按钮触发生成,可以获取 [思维导图 Action动作版本](https://openwebui.com/posts/turn_any_text_into_beautiful_mind_maps_3094c59a)。
**作者:** [Fu-Jie](https://github.com/Fu-Jie) | **版本:** 1.0.0 | **项目:** [OpenWebUI Extensions](https://github.com/Fu-Jie/openwebui-extensions) | **许可证:** MIT
---
## 🚀 为什么会有工具Tool版本
1. **得益于 OpenWebUI 0.8.0 的 Rich UI 特性**:在以前的版本中,是不支持直接将自定义的 HTML/iframe 嵌入到对话流中的。而从 0.8.0 开始平台不仅支持了这种顺滑的前端组件直出Rich UI而且同时对 **Action****Tool** 开放了该能力。
2. **AI 自主调用(区别于 Action****Action** 是被动的,需要用户在输入框或消息旁手动点击触发;而 **Tool** 赋予了模型**自主权**。AI 可以根据对话上下文,自行判断在什么时候为您生成导图最有帮助,实现真正的“智能助理”体验。
它非常适合以下场景:
- 总结复杂的对话内容。
- 规划项目、整理文章大纲。
- 解释具有层级结构的抽象概念。
## ✨ 核心特性
-**主动触发生成**AI 在感知到需要视觉化展示时会自动调用工具生成导图。
-**全量上下文感知**支持聚合整个会话历史MESSAGE_COUNT 为 0生成最完整的知识地图。
-**原生多语言 UI (i18n)**:自动检测并适配浏览器/系统语言(简体中文、繁体中文、英文、日文、韩文等)。
-**统一的高级视觉**:完全复刻 Action 版本的极简工具栏、玻璃拟态审美以及专业边框阴影。
-**深度交互控制**:支持缩放(放大/缩小/重置)、层级调节(默认为 3 级展开)以及全屏模式。
-**高品质导出**:支持将导图导出为超高清 PNG 图片。
## 🛠️ 安装与设置
1. **安装**:在 OpenWebUI 管理员设置 -> 插件 -> 工具中上传 `smart_mind_map_tool.py`
2. **启用原生理机制**:在“管理员设置 -> 模型”或配置里,确保目标模型**启用了原生工具调用Native Tool Calling**。只有开启这个能力AI 才能自主并稳定地触发 Tool 功能。
3. **分配工具**:在工作区或聊天界面处为目标模型选中并挂载本工具。
4. **配置**
- `MESSAGE_COUNT`:设置为 `12`(默认)以使用最近的 12 条对话记录,或设置为 `0` 聚合全部历史。
- `MODEL_ID`:指定分析导图时偏好的模型(留空则默认使用当前模型)。
## ⚙️ 配置参数 (Valves)
| 参数 | 默认值 | 描述 |
| :--- | :--- | :--- |
| `MODEL_ID` | (留空) | 用于文本分析的模型 ID。留空则随当前聊天模型。 |
| `MESSAGE_COUNT` | `12` | 聚合消息的数量。`0` 表示全量消息,`12` 表示截取最近的 12 条。 |
| `MIN_TEXT_LENGTH` | `100` | 触发导图分析所需的最小字符长度。 |
## ❓ 常见问题
- **语言显示不正确?**:工具采用 4 级探测机制(前端脚本 > 浏览器头 > 用户资料 > 默认)。请检查浏览器语言设置。
- **生成的导图太小或太大?**:我们针对对话流内联显示优化了 `500px` 的固定高度,并配有自适应缩放逻辑。
- **导出图片**:建议先点击“⛶”进入全屏,获得最佳构图后再点击导出。
---
## ⭐ 支持
如果这个工具帮您理清了思路,欢迎在 [GitHub](https://github.com/Fu-Jie/openwebui-extensions) 给我们一个 Star。
## ⚖️ 许可证
MIT License. Designed with ❤️ by Fu-Jie.