aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/module-aiassist.js8
-rw-r--r--modules/core/module-loader.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/core/module-aiassist.js b/modules/core/module-aiassist.js
index 5a0c389..5273678 100644
--- a/modules/core/module-aiassist.js
+++ b/modules/core/module-aiassist.js
@@ -1836,11 +1836,11 @@ buildSystemPrompt() {
if (!mindmap) return JSON.stringify({ error: 'MindmapModule not loaded' });
const topic = a.topic || 'Mindmap';
const children = a.children || '';
- mindmap.root = null;
const args = topic.split(' ');
mindmap._new(args);
- if (!mindmap.root) return JSON.stringify({ error: 'Failed to create root' });
- const rootId = mindmap.root.id;
+ const cur = mindmap._ensureMindmap();
+ if (!cur) return JSON.stringify({ error: 'Failed to create mindmap' });
+ const rootId = cur.root.id;
const added = [];
if (children) {
const childNames = children.split(',').map(c => c.trim()).filter(Boolean);
@@ -1850,7 +1850,7 @@ buildSystemPrompt() {
}
}
mindmap._svg([]);
- return JSON.stringify({ success: true, topic, children: added.length ? added : 'none', nodes: mindmap._countNodes(mindmap.root), rendered: 'inline SVG in terminal' });
+ return JSON.stringify({ success: true, topic, children: added.length ? added : 'none', nodes: mindmap._countNodes(cur.root), rendered: 'inline SVG in terminal' });
}
case 'view_module':
case 'edit_module':
diff --git a/modules/core/module-loader.js b/modules/core/module-loader.js
index 82f2bc0..0261256 100644
--- a/modules/core/module-loader.js
+++ b/modules/core/module-loader.js
@@ -105,7 +105,7 @@
window.__moduleLoaderReload = reloadWithSelection;
- const LATEST_VER = '2026-06-11-v4.5.44';
+ const LATEST_VER = '2026-06-11-v4.5.45';
const CACHE = '?v=' + LATEST_VER;
const stored = localStorage.getItem('webx11_cache_ver');
if (stored !== LATEST_VER) {