dsh-mindmap 0.18.6 → 0.18.8
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 +2 -0
- package/client.js +10 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -38,6 +38,8 @@ All notable changes to this project are documented here. Release-specific notes
|
|
|
38
38
|
|
|
39
39
|
### Fixed
|
|
40
40
|
|
|
41
|
+
- Standalone panels now portal their fixed host to `document.body` instead of rendering inside the conversation header actions slot, preventing host header overflow from clipping the entire panel on DSH 0.2.2 (issue #5). Closing still keeps the workspace mounted with `display:none`; Better Sidebar tabs, layout-push behavior, resizing, and panel visuals remain unchanged.
|
|
42
|
+
|
|
41
43
|
- Focus synchronization no longer oscillates between two open mindmaps (issue #4). The AI-focus baseline is now event-driven — the document last created, opened, or updated by a tool result (read-only `mindmap_get` never moves it) — instead of the creation-order tail, which stayed pinned to the newer file so the comparison could never converge. Auto-sent `mindmap_open` messages are gated three ways: at most one per document per mount, a module-level per-session memory of sent display/focus pairs that survives tab remounts and dual windows, and a hard cap of 5 automatic opens per session that stops silently with a single notice (shown in both directory and mindmap views). Restored mount state (an out-of-sync display/focus pair established by the mount-time auto-open) is no longer a trigger, so a remounted tab or a reloaded page never sends a spontaneous message, and cwd arrival after a remount only changes the message's relative-path text instead of re-arming the effect. The sync effect now depends on values (displayed document, AI focus, visibility, session) rather than snapshot object identity, so remounts and unrelated tool results no longer re-fire it. Regression tests cover the two-document idle scenario (at most one message, then convergence), remount memory survival, and the hard-cap silent stop with a one-time notice.
|
|
42
44
|
|
|
43
45
|
- Extend the full-file-access compatibility fix to root renames, clearing content, and broad rewrites: when the host's live `sandboxPolicy.resolve({ session })` explicitly returns `danger-full-access`, these operations no longer request an extra plugin approval that the full-access preset would automatically reject. This supersedes the high-risk exception in the earlier ordinary-write fix below. Non-full-access policies still gate high-risk writes, and disabling approval prompts alone grants no file access. Upstream approval decisions, path containment, collision checks, size limits, revision conflicts, and session-grant isolation are preserved; guidance, settings help, and security documentation now describe the same boundary.
|
package/client.js
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
//
|
|
3
3
|
// 职责:
|
|
4
4
|
// - 「思维脑图」按钮:挂 conversation.session.header.actions(list 槽,追加式),
|
|
5
|
-
//
|
|
6
|
-
//
|
|
7
|
-
// -
|
|
8
|
-
//
|
|
9
|
-
// details
|
|
5
|
+
// 点击切换右侧悬浮脑图面板的开/合;会话能力(useSession/sessionId/inputActions)
|
|
6
|
+
// 经 props 直给面板组件。
|
|
7
|
+
// - 独立脑图面板:通过 react-dom portal 挂到 document.body,避开头部祖先的
|
|
8
|
+
// overflow 裁剪;右缘贴边全高悬浮、左缘拖拽调宽(280~80% 视口,
|
|
9
|
+
// localStorage 持久化)。details 槽已归还官方(003 的顶替方案退役)。
|
|
10
10
|
// - 实时数据通路:消费会话快照里 mindmap_* 工具的 ToolResultNode,重放出各文档
|
|
11
11
|
// 的最新内容并渲染(002/003:无自定义事件通道,工具调用本身就是事件流)。
|
|
12
12
|
// 023 双代:useChat → ChatSnapshot.legacy.nodes(dsh 0.1.2-rc.1+)优先,
|
|
@@ -25,6 +25,7 @@ window.__ModuleLoader__.load({
|
|
|
25
25
|
var exports = module.exports;
|
|
26
26
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
27
27
|
let react = require("react");
|
|
28
|
+
let react_dom = require("react-dom");
|
|
28
29
|
|
|
29
30
|
const inject = ["slots"];
|
|
30
31
|
|
|
@@ -4613,6 +4614,7 @@ window.__ModuleLoader__.load({
|
|
|
4613
4614
|
|
|
4614
4615
|
/**
|
|
4615
4616
|
* 独立 fixed 壳(026 拆分):仅 Better Sidebar 未安装或服务不可用时使用。
|
|
4617
|
+
* 通过 portal 挂到 document.body,避免被头部槽位祖先的 overflow 裁剪。
|
|
4616
4618
|
* 管理壳特有几何——右缘贴边悬浮、左缘拖拽调宽(localStorage 持久化)、
|
|
4617
4619
|
* 头部高度对齐聊天区、layout-push CSS 变量(--dsh-mindmap-width)。
|
|
4618
4620
|
* 壳内始终挂载 MindmapWorkspace(visible=open):收起时 display:none 隐藏,
|
|
@@ -4776,10 +4778,11 @@ window.__ModuleLoader__.load({
|
|
|
4776
4778
|
headerHeight,
|
|
4777
4779
|
variant: "standalone",
|
|
4778
4780
|
});
|
|
4779
|
-
|
|
4781
|
+
const host = (0, react_jsx_runtime.jsx)("div", { style: open ? S.panelHost : { display: "none" }, children: (0, react_jsx_runtime.jsxs)("div", { ref: panelRootRef, style: open ? { ...S.overlayRoot, width: panelWidth } : { display: "none" }, children: [
|
|
4780
4782
|
open ? (0, react_jsx_runtime.jsx)("div", { style: S.overlayHandle, onMouseDown: startResize }) : null,
|
|
4781
4783
|
workspace,
|
|
4782
4784
|
] }) });
|
|
4785
|
+
return react_dom.createPortal(host, document.body);
|
|
4783
4786
|
}
|
|
4784
4787
|
|
|
4785
4788
|
/**
|
|
@@ -5534,6 +5537,7 @@ window.__ModuleLoader__.load({
|
|
|
5534
5537
|
MindmapSidebarTab,
|
|
5535
5538
|
// 027 内嵌头部视觉对齐:壳无关工作区组件 + 样式表(供测试验证 variant 分支)。
|
|
5536
5539
|
MindmapWorkspace,
|
|
5540
|
+
MindmapDetailsPanel,
|
|
5537
5541
|
S,
|
|
5538
5542
|
// 029 会话清理组件测试:MindmapSlot 直接调用(供测试验证 store 清理)。
|
|
5539
5543
|
MindmapSlot,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mindmap",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.8",
|
|
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",
|