dsh-mindmap 0.10.1 → 0.11.0
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/CHANGELOG.md +4 -0
- package/client.js +21 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -11,6 +11,10 @@ All notable changes to this project are documented here. Release-specific notes
|
|
|
11
11
|
|
|
12
12
|
### Fixed
|
|
13
13
|
|
|
14
|
+
- dsh-tools peer dependency window extended to cover the `0.1.5-rc.1` release: `^0.1.5-alpha.0` is appended to the comparator list (`^0.1.0-rc.6 || ^0.1.1-rc.0 || ^0.1.2-alpha.0 || ^0.1.3-alpha.0 || ^0.1.5-alpha.0`). Under node-semver prerelease tuple rules, `0.1.5-rc.1` requires a `[0,1,5]` tuple with a prerelease tag in the range — without this comparator, `pnpm add dsh-mindmap` on a 0.1.5 host fails with ERESOLVE. The static API surface (Agent `{ id }`, `SessionHeader.cwd`, `settings.describe` envelope, `ChatSnapshot.legacy.nodes`, `ToolResultNode` fields, `conversation.session.header.actions` slot, client inject ids, `@deepseek-ai/schemastery ^3.18.0`) was verified unchanged against the 0.1.5-rc.1 npm package.
|
|
15
|
+
- Runtime verification on dsh 0.1.5-rc.1 with `dsh-better-sidebar` v0.18.1 confirms the plugin loads and renders in sidebar Tab mode: the MindmapSidebarTab registers, the mindmap settings panel (line style, card style, color theme, default width, growth animation), the directory tree tab, and the header 思维脑图 button all render and function correctly. A known timing issue causes the first directory-tree fetch to report "session has no working directory" on session switch (sessionStore write races the first fetch); clicking 刷新 restores it.
|
|
16
|
+
- Sidebar auto-expand: clicking the header 思维脑图 button (or an AI `mindmap_create`/`open` auto-open) now automatically expands the Better Sidebar panel in addition to focusing the mindmap tab. Previously the tab activated but the panel stayed collapsed, requiring a manual "展开侧边栏" click. Root cause: `dsh-better-sidebar`'s `openTab(seed, scope)` only auto-expands the panel for "content-type" opens where the seed carries a `path` or `url` field (`service.ts:707`); a pure type-only open (`{ type: "dsh-mindmap:mindmap" }`) never expands. Fix: a new `openMindmapTab(svc, scope)` helper attaches an inert `url: "dsh-mindmap://mindmap"` to the seed, making it a content-type open. All three `openTab` call sites (header button click, MindmapSlot auto-open fallback, MindmapSidebarTab onAutoOpen) go through the helper. The `url` is not overwritten onto an already-existing tab (focus path), so there are no side effects; older BS versions without this logic degrade gracefully to the previous behavior (tab activates without panel expansion).
|
|
17
|
+
|
|
14
18
|
- 内嵌 M 徽标增大至 16px、字母加粗,改为透明底与跟随文件名主题色的描边,改善换肤后的辨识度。
|
|
15
19
|
- 内嵌模式的 Markdown 文件恢复为紧凑 M 徽标;其他格式文件仅展示,禁用悬停反馈、打开、拖拽与右键操作,文件夹仍可展开。
|
|
16
20
|
- 内嵌 Better Sidebar 的列表与标签采用宿主字体角色(正文 14px、界面 12px),目录改用 14px 线框图标,修复字号继承偏大及标签字号混杂;独立模式和脑图节点排版不变。
|
package/client.js
CHANGED
|
@@ -3678,10 +3678,11 @@ window.__ModuleLoader__.load({
|
|
|
3678
3678
|
);
|
|
3679
3679
|
const data = react.useSyncExternalStore(subscribe, getSnapshot);
|
|
3680
3680
|
|
|
3681
|
-
|
|
3682
|
-
|
|
3683
|
-
|
|
3684
|
-
|
|
3681
|
+
// auto-open 回调:新的 mindmap_create/open 到达时聚焦本 Tab。
|
|
3682
|
+
// 031:经 openMindmapTab helper 附惰性 url,让 BS 自动展开右栏面板。
|
|
3683
|
+
const onAutoOpen = react.useCallback(() => {
|
|
3684
|
+
openMindmapTab(ctx && ctx.betterSidebar, scope);
|
|
3685
|
+
}, [ctx, scope]);
|
|
3685
3686
|
|
|
3686
3687
|
if (!data) {
|
|
3687
3688
|
// MindmapSlot 尚未写入数据(Tab 先于会话激活打开)。
|
|
@@ -3704,6 +3705,20 @@ window.__ModuleLoader__.load({
|
|
|
3704
3705
|
});
|
|
3705
3706
|
}
|
|
3706
3707
|
|
|
3708
|
+
/**
|
|
3709
|
+
* 031 嵌入模式自动展开:BS 的 openTab 只有「内容型 open」(seed 带 path/url)
|
|
3710
|
+
* 才自动展开右栏面板(service.ts 只看 seed 字段不看 type);纯 type-only
|
|
3711
|
+
* open 永不展开。seed 附惰性 url 即可与 standalone 模式一样「点击即见」。
|
|
3712
|
+
* url 对已存在的 tab 不生效(focus 不覆盖);旧版 BS 无此逻辑时退化为
|
|
3713
|
+
* 现状(仅激活 tab),无回归。
|
|
3714
|
+
*/
|
|
3715
|
+
function openMindmapTab(svc, scope) {
|
|
3716
|
+
if (!svc || typeof svc.openTab !== "function") return;
|
|
3717
|
+
try {
|
|
3718
|
+
svc.openTab({ type: "dsh-mindmap:mindmap", url: "dsh-mindmap://mindmap" }, scope);
|
|
3719
|
+
} catch { /* BS 已卸载或方法缺失 */ }
|
|
3720
|
+
}
|
|
3721
|
+
|
|
3707
3722
|
/**
|
|
3708
3723
|
* 会话内容节点的双代快照选择(023):dsh ≤0.1.1 的 useSession 快照带
|
|
3709
3724
|
* 平铺 nodes;0.1.2-rc.1 起 SessionSnapshot 拆成纯控制状态,会话内容
|
|
@@ -3798,7 +3813,7 @@ window.__ModuleLoader__.load({
|
|
|
3798
3813
|
const target = autoOpenTarget(sidebarDocs, sidebarSeen.current);
|
|
3799
3814
|
sidebarSeen.current = openingEventKeys(sidebarDocs);
|
|
3800
3815
|
if (target) {
|
|
3801
|
-
|
|
3816
|
+
openMindmapTab(sidebar, { sessionId });
|
|
3802
3817
|
}
|
|
3803
3818
|
}, [sidebarDocs, sidebarMode, sessionId, sidebar]);
|
|
3804
3819
|
|
|
@@ -3832,7 +3847,7 @@ window.__ModuleLoader__.load({
|
|
|
3832
3847
|
title: "脑图面板:展开 / 收起",
|
|
3833
3848
|
style: S.mButton,
|
|
3834
3849
|
onClick: () => {
|
|
3835
|
-
|
|
3850
|
+
openMindmapTab(sidebar, { sessionId });
|
|
3836
3851
|
},
|
|
3837
3852
|
children: [mButtonIcon, "思维脑图"],
|
|
3838
3853
|
}) });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mindmap",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Mindmap plugin for DeepSeek Harness: a plain markdown file in the working directory IS the mindmap; the chat edits it step by step and the right-side panel follows live.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@deepseek-ai/schemastery": "^3.18.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.1.1-rc.0 || ^0.1.2-alpha.0 || ^0.1.3-alpha.0",
|
|
39
|
+
"@deepseek-ai/dsh-tools": "^0.1.0-rc.6 || ^0.1.1-rc.0 || ^0.1.2-alpha.0 || ^0.1.3-alpha.0 || ^0.1.5-alpha.0",
|
|
40
40
|
"dsh-better-sidebar": ">=0.10.0"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|