From e4ffabd5ab34ec5a5ddecc19a77a2ca55b9fd1e0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 06:10:16 +0000 Subject: [PATCH 1/8] Initial plan From 7509b6e027cf675e998d0287513cc114bc60ab47 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 27 Jan 2026 06:17:20 +0000 Subject: [PATCH 2/8] Add MindMap component to ai directory with functional API pattern Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com> --- package.json | 1 + src/ai/index.ts | 2 + src/ai/playground/index.html | 21 +++++ src/ai/playground/main.ts | 93 ++++++++++++++++++ src/ai/playground/package.json | 4 +- src/ai/types/index.ts | 16 ++++ src/ai/util/graph.ts | 45 +++++++++ src/ai/vis/mind-map/README.md | 161 ++++++++++++++++++++++++++++++++ src/ai/vis/mind-map/index.ts | 166 +++++++++++++++++++++++++++++++++ 9 files changed, 508 insertions(+), 1 deletion(-) create mode 100644 src/ai/types/index.ts create mode 100644 src/ai/util/graph.ts create mode 100644 src/ai/vis/mind-map/README.md create mode 100644 src/ai/vis/mind-map/index.ts diff --git a/package.json b/package.json index 5e99bbc4..bc3a53cc 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "@zumer/snapdom": "^1.9.14", "copy-text-to-clipboard": "^3.2.2", "lodash": "^4.17.21", + "preact": "^10.28.2", "rc-resize-observer": "^1.4.3", "react-error-boundary": "^6.0.0", "react-markdown": "^9.1.0", diff --git a/src/ai/index.ts b/src/ai/index.ts index facb2820..841e5b18 100644 --- a/src/ai/index.ts +++ b/src/ai/index.ts @@ -39,3 +39,5 @@ export type { } from './vis/waterfall'; export { WordCloud } from './vis/word-cloud'; export type { WordCloudConfig, WordCloudDataItem, WordCloudOptions } from './vis/word-cloud'; +export { MindMap } from './vis/mind-map'; +export type { MindMapConfig, MindMapData, MindMapOptions } from './vis/mind-map'; diff --git a/src/ai/playground/index.html b/src/ai/playground/index.html index 39ec8c4c..503d673c 100644 --- a/src/ai/playground/index.html +++ b/src/ai/playground/index.html @@ -623,6 +623,27 @@