dsh-linked-workspace 0.26.1 → 0.27.1

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 CHANGED
@@ -1,5 +1,71 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.27.1 — 2026-11-26
4
+
5
+ - Markdown previews **refuse documents above 512 Ki characters** instead of rendering them
6
+ synchronously on the Host's event loop. A 9 MB plan rendered in ~9 s and produced a 97 MB fragment,
7
+ and every other API call queued behind it. The panel now falls back to the editor with a yellow
8
+ notice, a file whose byte size alone exceeds the ceiling (three UTF-8 bytes per character) is
9
+ rejected from a single `stat` without transferring it, and the last three rendered previews are
10
+ cached by content hash so re-opening a file is instant.
11
+ - Markdown opened in a **file tab** shows the document pane (preview, edit, export) instead of the bare
12
+ code editor — the same surface the directory panel already used.
13
+ - A missing KaTeX stylesheet no longer breaks the whole preview: the renderer falls back to the base
14
+ fragment with a plain `<pre>` body.
15
+ - The free-space chip in the directory header refreshes together with the tree instead of keeping the
16
+ value from the first load until the panel was reopened.
17
+ - The placeholder hand-over now polls `nativePathTabs()` every 2 s (was 1 s) and skips hidden windows,
18
+ so a background tab costs nothing.
19
+
20
+ ## 0.27.0 — 2026-11-26
21
+
22
+ - Markdown previews are rendered **inside the Host process** instead of by spawning
23
+ `node scripts/md-to-html.mjs`. When the DSH process had no `node` on its PATH the child run failed
24
+ and the preview silently fell back to a plain renderer, so every formula showed up as raw
25
+ `$$ … $$` text (one such desktop install hit exactly that). The renderer now lives in
26
+ `lib/markdown.js`, `scripts/md-to-html.mjs` is a thin CLI wrapper over it for standalone use and
27
+ tests, and no preview path shells out any more.
28
+ - Equation numbers sit **beside** the formula instead of on top of it. KaTeX pins `\tag{…}` with
29
+ `position: absolute; right: 0`, which parks the number on the formula itself as soon as the block
30
+ is narrower than the column — and the preview needed a narrow block so wide formulas could scroll.
31
+ Tagged formulas now keep KaTeX's block layout and lay the number out in flow (`margin-left: 1.6em`,
32
+ `position: static`, matched with `:has()` so only tagged formulas are affected), while
33
+ `min-width: max-content` keeps horizontal scrolling for anything wider than the pane.
34
+ - Markdown previews no longer collapse their formulas. The preview sanitiser used to strip the
35
+ inline `<style>` block that carries the KaTeX stylesheet — and even without that, the HTML parser
36
+ moves a leading `<style>` into `<head>`, so the fragment never survived parsing. The stylesheet is
37
+ now extracted and rendered next to the preview by React, and the sanitiser allows the small set of
38
+ length-only inline styles KaTeX uses for vertical layout (`height`, `top`, `vertical-align`,
39
+ `margin-*`, `border-*`, always `position: relative`). A dense document with 30 display formulas
40
+ renders with zero overlapping rows.
41
+ - A file opened from the **active remote workspace placeholder directory** (a markdown link in
42
+ the chat resolves against the session cwd, which is empty by design) is now handed over to the
43
+ plugin's own remote tab: the borrowed page is closed and the file opens on the remote host, where
44
+ it can be edited and saved back. The hand-over polls `nativePathTabs()` once a second because
45
+ native right-column tabs live outside the sidebar store, so `subscribeState` alone never fires.
46
+ - The workspace tree no longer hangs on **Loading…**: the panel cache stops persisting the
47
+ "currently loading" flag (a tab torn down mid-request used to come back stuck there forever),
48
+ restored records are cleaned on the way in and refetched, and a listing that produces nothing
49
+ for 20 seconds turns into **“Taking too long — click to retry”** so a dropped request is recoverable.
50
+ - The **Where the last artifact opens** setting (previously “Where artifacts open”) now shows which
51
+ choice is active: “Prefer remote tree / Prefer local copy” got the missing selected style.
52
+ - **Keyboard shortcuts** and **Allowed hosts** in the settings are collapsed by default, like
53
+ “Allowed workspaces (second layer)”, showing “Show (5)” / “Show (N ticked)” until asked for.
54
+ - Linked and remote workspaces whose SSH host is no longer in the DSH config are **skipped from the workspace list** instead of blocking `linked.list` for 20+ seconds trying to reach them.
55
+ - Markdown preview rendering now uses **micromark + KaTeX** to match DSH's native pipeline, so math formulas (`$...$` and `$$...$$`) render correctly in both the preview and the sidebar file viewer.
56
+ - The preview is self-contained: it ships KaTeX's stylesheet **inside the rendered HTML** and the host serves the KaTeX font files under `/dsh-linked-workspace/assets/`, so formulas no longer collapse when the machine is offline or the page has no CDN access. Removing the CDN link also means no third-party request per preview.
57
+ - The workspace directory panel has a **Locate last artifact** button: it asks the host
58
+ which file the chat presented most recently and opens it in the tree: the right-hand workspace pane opens (or comes forward)
59
+ and reveals that exact file, instead of guessing a local path.
60
+ - New setting **Where the last artifact opens** (设置 → 联动工作区 → 最近产物打开位置):
61
+ `remote` (default) walks the remote tree first, `local` prefers the local copy
62
+ of a linked workspace. Remote workspaces ignore the preference and only ever
63
+ open the remote side — nothing is written to the local disk.
64
+ - A file outside every workspace is reported with its real path in the notice and
65
+ copied to the clipboard, instead of silently opening the wrong tree.
66
+ - The button has its own crosshair glyph, so it no longer looks like **Transfer history**.
67
+ - Host API: `settings.revealSide`, `linked.lastArtifact`, in-process `docs.mdPreview`, `API_REVISION` 14.
68
+
3
69
  English · [简体中文](CHANGELOG.zh.md)
4
70
 
5
71
  ## 0.26.1 — 2026-11-24
package/README.en.md CHANGED
@@ -25,7 +25,7 @@ Turn an existing SSH connection into a **linked workspace** or a **remote worksp
25
25
  - **DSH**: 0.2.1-rc.4 or newer (`engines` allows `>=0.2.0-rc.2 <0.3.0-0`).
26
26
  - **SSH**: the host lives in `~/.ssh/config`, or in DSH's SSH Manager (`dsh-ssh-tunnel`, optional). A plain `~/.ssh/config` is enough: the plugin ships its own SSH client and pins the host key on first use into `$DSH_HOME/linked-workspace/known_hosts.json` (a changed key is refused, with instructions to delete that entry). **`dsh-ssh-tunnel` is optional**: a host in `~/.ssh/config` without an `IdentityFile` can be given a password once in the “Add workspace” dialog, and it stays on this machine (see “SSH credentials” under Configuration).
27
27
  - **dsh-better-sidebar** (optional): `>=0.24.0`. It renders the sidebar directory pages and the file editor; without it everything else (settings page, directory pickers, agent tools) still works.
28
- - **Document editing** (optional): Python 3 with `python-docx`, `openpyxl`, `python-pptx` and `PyMuPDF`; set `DSH_OFFICE_PYTHON` to choose the interpreter. Markdown needs no Python.
28
+ - **Document editing** (optional): Python 3 with `python-docx`, `openpyxl`, `python-pptx` and `PyMuPDF`; set `DSH_OFFICE_PYTHON` to choose the interpreter. Markdown previews are rendered inside the plugin process — no Python, and no `node` on your PATH.
29
29
  - **Development**: Node.js ≥ 20.
30
30
 
31
31
  ## Quick start
@@ -63,6 +63,15 @@ The plugin takes over the DSH sidebar/hero directory-selection hole; the dialog
63
63
  >
64
64
  > That also explains why a workspace reads “Not connected” right after DSH starts: it means “this process has not dialled that host yet”, not “it cannot”. To find out immediately, press **Reconnect** on the card in settings — it drops the old socket, dials once, and either reports “Reconnected” with the round-trip time or shows the host's own error message.
65
65
 
66
+ ### Jump to a chat artifact in the right tree
67
+
68
+ The clock button at the left end of the directory toolbar — **Locate last artifact** — asks
69
+ the host which file the chat presented last, then opens (or raises) the right-hand pane and
70
+ reveals that file as a tab.
71
+
72
+ Settings → Linked workspaces → *Where the last artifact opens* picks the default side; a remote workspace has no local copy, so it only ever opens the remote file.
73
+
74
+
66
75
  ### Sidebar: “Linked Workspace Directory”
67
76
 
68
77
  The heading shows the free space of the remote volume that holds the workspace;
package/README.md CHANGED
@@ -25,7 +25,7 @@
25
25
  - **DSH**:0.2.1-rc.4 或更高(`engines` 允许 `>=0.2.0-rc.2 <0.3.0-0`)。
26
26
  - **SSH**:主机写在 `~/.ssh/config`,或加入 DSH 的 SSH Manager(`dsh-ssh-tunnel`,可选)。裸 `~/.ssh/config` 也够用:插件自带 SSH 客户端,首次连接**自动信任并记录**主机指纹到 `$DSH_HOME/linked-workspace/known_hosts.json`,指纹变化时拒绝连接并提示删除对应条目。**不安装 `dsh-ssh-tunnel` 也能用**:没有 `IdentityFile` 的主机可在这个插件的「添加工作区」弹窗里填一次密码,密码保存在本机(见「配置 → SSH 凭据」)。
27
27
  - **dsh-better-sidebar**(可选):`>=0.24.0`。装上才有右侧栏目录页与文件编辑页;缺少时其余功能(设置页、目录选择、模型工具)照常可用。
28
- - **文档编辑**(可选):Python 3 及 `python-docx`、`openpyxl`、`python-pptx`、`PyMuPDF`;可用 `DSH_OFFICE_PYTHON` 指定解释器。Markdown 不需要 Python。
28
+ - **文档编辑**(可选):Python 3 及 `python-docx`、`openpyxl`、`python-pptx`、`PyMuPDF`;可用 `DSH_OFFICE_PYTHON` 指定解释器。Markdown 预览在插件进程内渲染,不需要 Python,也不需要在 PATH 里放 `node`。
29
29
  - **开发**:Node.js ≥ 20。
30
30
 
31
31
  ## 快速开始
@@ -63,6 +63,17 @@
63
63
  >
64
64
  > 所以刚重启 DSH 时,还没打开过的工作区显示「未连接」是正常的——那是「这个进程还没连过」而不是「连不上」。想立刻确认,点设置页卡片上的**重新连接**:它会丢掉旧连接、当场拨一次号,成功就变「已连接」并显示耗时,失败则把主机的原话显示出来。
65
65
 
66
+ ### 聊天产物一键定位
67
+
68
+ 目录面板工具栏最左边有个时钟按钮 **定位最近产物**:它问宿主「这轮聊天最后展示的是哪个文件」,
69
+ 然后把右侧面板打开(或切到前台)并在树里定位、以标签页打开那个文件。
70
+
71
+ 两侧打开哪一边由「设置 → 联动工作区 → 最近产物打开位置」决定:默认优先远端,
72
+ 也可以改成优先本地副本;远程工作区没有本地副本,只会打开远端。
73
+ 文件不在任何工作区目录里时,提示里会写出实际路径并复制到剪贴板。
74
+
75
+ 「设置 → 联动工作区 → 最近产物打开位置」可以选默认走远端还是本地;远程工作区的会话没有本地副本,所以永远只开远端那一份。
76
+
66
77
  ### 右侧栏「联动工作区目录」
67
78
 
68
79
  目录栏标题右侧显示该工作区所在远端卷的可用空间,悬停可看到总量与已用百分比。
package/docs/API.md CHANGED
@@ -24,7 +24,7 @@ Codes: `BAD_REQUEST`, `NOT_FOUND`, `SSH_CONNECT`, `AUTH_FAILED`,
24
24
  | `docs.text` | `{ path, linkedId?, remoteId?, maxChars? }` | `{ kind, path, size, mtime, pageCount?, text, truncated }` (plain text out of PDF / Word / Excel / PowerPoint; `maxChars` is clamped to 1000–200000, default 40000) |
25
25
  | `docs.write` | `{ path, data, expectedMtime?, linkedId?, remoteId? }` | `{ kind, path, size, mtime }` |
26
26
  | `docs.create` | `{ path, kind?, linkedId?, remoteId? }` | `{ kind, path, size, mtime }` |
27
- | `docs.mdPreview` | `{ path, text?, linkedId?, remoteId? }` | `{ kind, html }` |
27
+ | `docs.mdPreview` | `{ path, text?, linkedId?, remoteId? }` | `{ kind: 'markdown-preview', html }` (rendered in-process; the fragment carries the KaTeX stylesheet and expects the plugin's `/dsh-linked-workspace/assets/katex/` fonts; the last 3 renders are cached by content hash) or `{ kind: 'markdown-preview-too-large', chars \| bytes, limit }` for a document above 512 Ki characters — the viewer must show the editor instead |
28
28
  | `docs.mdPdf` | `{ path, text?, linkedId?, remoteId? }` | `{ kind: "pdf", path, size, mtime }` |
29
29
 
30
30
  ## Records
@@ -112,6 +112,7 @@ scope root, or absolute inside it.
112
112
  | `linked.push` | `{ id, paths?, dryRun?, conflict?, jobId? }` | `{ linkedId, dryRun, conflict, files, pushed, skipped, conflictsLeft, bytes, cancelled }` (`conflict` is `skip` by default; every file is written as a temporary file and renamed into place; `paths` entries may be files or folders — a folder matches everything under it — and every planned entry carries `localMtime` / `remoteMtime`) |
113
113
  | `linked.pushCancel` | `{ jobId }` | `{ cancelled }` (stops after the file being written) |
114
114
  | `transfer.history` | `{}` | `{ entries: [{ kind: "transfer" \| "push", direction?, linkedId?, files, bytes, skipped, truncated?, at }] }` (newest first, at most 50) |
115
+ | `linked.lastArtifact` | `{ sessionId }` | `{ artifact: { path, at } \| null }` (the file the chat presented most recently in that session; in memory, cleared on restart) |
115
116
  | `linked.sessionScope` | `{ sessionId }` | `{ scope: { linkedId?, remoteId?, root, cwd } \| null }` (resolves which linked/remote workspace a session belongs to by matching the registry path against every record; session ids are compared with or without the `session-` prefix. The `@` picker calls this instead of guessing from the agent context, which only carries `sessionId`) |
116
117
  | `fs.references` | `{ linkedId?/remoteId?, query, limit?, includeIgnored?, side? }` | `{ ok, query, candidates: [{ path, relative, name, kind }], total, truncated, scannedEntries }` (path completion for `@`-style references: matches the **path**, case-insensitive, best match first — exact name, then prefix, then substring; `limit` defaults to 50 and caps at 200; walking stops after 20000 entries or 3 s; `side: 'local'` searches the local tree of a linked workspace. **An empty `query` returns no candidates**, and a full tree walk takes 5–20 s on a real remote, so the `@` picker no longer uses this method — it lists one directory at a time by calling `fs.list` with the parent path) |
117
118
  | `fs.compare` | `{ linkedId?, path? }` | `{ path, relative, localPath, localMissing, counts: { onlyLocal, onlyRemote, changed, same }, onlyLocal, onlyRemote, changed, truncated, remoteTruncated, localTruncated, skippedLinks }` (linked workspaces only; excludes `.git`, `node_modules`, `.local`, `.remote`; 4000 files and depth 12 **per side**, 200 rows per group; `skippedLinks` counts symlinks and non-regular files) |
@@ -149,7 +150,7 @@ Under `$DSH_HOME/linked-workspace/`:
149
150
  - `linked.json` — linked workspaces (no credentials).
150
151
  - `remote-workspaces.json` — remote workspaces (no credentials).
151
152
  - `forwards.json` — `{ version, forwards: [{ id, hostId, hostName, remoteHost, remotePort, localPort, startedAt }] }`. Since 0.25.0 the tunnels opened from 设置 → 端口转发 are standing arrangements: the listener is re-bound on start (with a new local port if the old one is taken, and the record updated), and only `hosts.unforward` removes an entry.
152
- - `settings.json` — `{ editorTheme, editorThemeFamily, editorThemeMode, fileOpenMode, autoSave, execEnabled, execHostIds, execWorkspaceIds, execTimeoutMs, execMaxOutputChars, execShell, hostKeyPolicy, outputEncoding, extraRoots }`. The four `autoPush*` keys are still accepted so an old file loads unchanged, but since 0.24.0 auto push is configured per workspace (`linked.json` → each record's `autoPush`), and those keys no longer drive any watcher.
153
+ - `settings.json` — `{ editorTheme, editorThemeFamily, editorThemeMode, fileOpenMode, autoSave, execEnabled, execHostIds, execWorkspaceIds, execTimeoutMs, execMaxOutputChars, execShell, hostKeyPolicy, outputEncoding, extraRoots, revealSide }`. `revealSide` is `"remote"` (default) or `"local"`: which tree the **Locate last artifact** button opens a chat artifact in for a linked workspace. Remote workspaces always use the remote tree. The four `autoPush*` keys are still accepted so an old file loads unchanged, but since 0.24.0 auto push is configured per workspace (`linked.json` → each record's `autoPush`), and those keys no longer drive any watcher.
153
154
  - `linked.json` — every record carries `autoPush: { enabled, debounceMs, include[], exclude[] }` (`debounceMs` clamped to 300–60000, default 1500). `linked.list` returns it, `linked.update { id, autoPush }` writes it, and the Host starts/stops one `fs.watch` per enabled workspace.
154
155
  The exec keys are off unless you turn them on: `execEnabled` defaults to
155
156
  `false`, `execHostIds` (host allow-list) starts empty, and
package/docs/VERIFY.md CHANGED
@@ -401,7 +401,49 @@ DSH_HOME/linked-workspace/exec-audit.jsonl` 追加一行 JSON,含 `auditId`、
401
401
  4. 浏览器(`http://127.0.0.1:<port>/?token=…`)里点目录工具栏的齿轮:应打开「联动工作区设置」标签并完整渲染整页(含工作区卡片、端口转发表单),不再提示找不到设置入口。
402
402
  5. 设置标签页与桌面端设置对话框同时改动同一项(例如显示模式)后,另一边刷新一次应看到相同结果。
403
403
 
404
- ## 右键菜单(0.25.0)
404
+ ## 定位最近产物(Unreleased)
405
+
406
+ 1. 在联动工作区的会话里打开右侧「联动工作区目录」面板,工具栏最左边应有一个十字准星图标,悬停提示「定位最近产物」。
407
+ 2. 让助手在聊天里展示一个文件(present),然后点这个按钮:右侧面板自动打开(或切到前台)并在树里定位到该文件、以标签页打开。
408
+ 3. 设置 → 联动工作区 → 「最近产物打开位置」切到「优先本地目录」后重做第 2 步:联动工作区打开的是本地副本;远程工作区不受影响,仍然只打开远端,本地磁盘不应出现该文件。
409
+ 4. 在一个还没展示过任何产物的会话里点按钮:提示「聊天里还没有可定位的产物」,不弹错误框。
410
+ 5. 展示的文件不在任何联动/远程工作区目录内时点按钮:提示里带完整实际路径,并已复制到剪贴板。
411
+
412
+ ## 目录树与设置页(Unreleased)
413
+
414
+ 1. 打开右侧「联动工作区目录」,展开几层后切到别的会话/标签再切回来:两棵树立刻按原来的展开状态显示,**不应出现停在「加载中…」的行**;刷新页面后同理。
415
+ 2. 把某个目录的网络请求卡住(例如临时用 devtools 让 `fs.list` 不返回)再展开它:20 秒后该行变成「加载超时,点击重试」,点一下能正常列出内容。
416
+ 3. 设置 → 联动工作区 → 「最近产物打开位置」:点「优先本地目录」后该按钮边框与底色变高亮、字重加粗;点回「优先远程目录」高亮随之切换。
417
+ 4. 同一页的「常用快捷键」默认只显示标题行 + 「展开(5 条)」按钮,点开后出现 `<kbd>` 列表、按钮变「收起」;「允许的主机」同样默认收起,按钮显示「展开(已选 N 个)」,收起时右侧显示已选主机名。
418
+
419
+ ## 右键菜单(Unreleased)
405
420
 
406
421
  1. 在高度吃紧的窗口里右键靠下的行(例如窗口 800px 高时右键第 18 行):菜单整体上翻到光标上方、最下面的「更改权限」「属性」都点得到;若上下空间都不够,菜单自身出现滚动条而不是被窗口裁掉。
407
422
 
423
+ ## Markdown 预览与公式(Unreleased)
424
+
425
+ 1. 打开一个同时含 `$...$` 与 `$$...$$` 的 Markdown 文件点「预览」:行内公式与正文**在同一基线**上,上下标不再掉到下一行;块级公式单独成行、居中、上下各留一截空白。
426
+ 2. 断开网络(或屏蔽 cdn.jsdelivr.net)后重复第 1 步:效果必须完全相同 —— 样式随渲染结果内联,字体由插件自己提供(`/dsh-linked-workspace/assets/katex/fonts/*.woff2`),预览不应再请求任何第三方域名。
427
+ 3. 公式里带中文:`$\text{速度} = \frac{\Delta x}{\Delta t}$` 正常显示;故意写错一个公式(如 `$\frac{a$`)只把那一处显示成红色错误,其余段落照常渲染。
428
+ 4. 预览里的样式不应影响应用本身:打开一个含公式的 Markdown 预览后,聊天区与侧栏的正文、按钮样式保持不变。
429
+ 5. 同一页里放一个很宽的块级公式:宽度放不下时该行自己横向滚动,不把整页撑出横向滚动条。
430
+ 6. 打开一份公式密集的文档(例如 ADR 里几十个块级公式):**分式的分子分母上下分开、下标在基线下方、公式编号不压在公式上**。用开发者工具检查 `.katex-display` 的 `overflow-x` 应为 `auto`、`.vlist>span` 应为 `position: relative`;页面里应存在一个带 `data-rw-katex` 的 `<style>`(KaTeX 样式表由预览自己渲染,不再依赖宿主或 CDN)。
431
+ 7. 带编号的公式(`$$…\tag{2.3-1}$$`):编号排在**公式右侧**、与公式之间留出约 1.6em 空隙,绝不与公式重叠;把窗口调窄到公式需要横向滚动时,编号随公式一起被推到右侧(可横向滚动看到),不会浮在中间。检查 `.tag` 的 `position` 为 `static`。文档里没有 `\tag` 的公式不受影响(仍居中、不加空格)。
432
+ 8. 在一台 **PATH 里没有 `node`** 的机器上(或用 `set PATH=C:\Windows\system32` 启动 DSH)打开含公式的 Markdown 预览:公式必须照常渲染成数学排版,**不能**退化成原样的 `$$ … $$` 文本 —— 渲染在 Host 进程内完成,不依赖外部 node。
433
+
434
+ ## 占位目录里的文件(Unreleased)
435
+
436
+ 1. 在**远程工作区**会话里让助手给出一个指向远端文件的 Markdown 相对链接(例如 `2016_完成度.md`),点它:右侧不应再出现「文件不存在:…\remote-placeholders\<uuid>\…」,而是直接打开该文件,且标签页地址是**远端绝对路径**(`/shared_data_…`)。
437
+ 2. 在同一个标签页里改一行再保存:远端文件内容随之改变(可用 `linked_workspace` 的 `read_outside` 或 `ssh` 核对);关掉标签页重新打开,内容是新版。
438
+ 3. 打开一个**本地**工作区里的文件(`D:\…`)和一个占位目录下的文件:只有后者被转交,本地文件标签原样保留、不被关闭。
439
+ 4. 占位目录下带子目录的路径(例如 `…\remote-placeholders\<uuid>\sub\notes.md`)同样转交成功;目录与无扩展名的路径不转交。
440
+ 5. 关闭并重启 DSH 后再点一次这样的链接:行为不变(首次轮询就能转交,不需要刷新页面);新建一个远程工作区后不刷新页面也能转交。
441
+
442
+ ## 预览体积、文件标签与刷新(Unreleased)
443
+
444
+ 1. 在目录树里点开一个**超过 51.2 万字符**的 Markdown(例如几 MB 的计划文档):面板顶部出现黄色提示「这个文件太大(N 字符,上限 524288),没有生成预览…」,正文退回编辑器(可编辑、可保存),不出现空白预览。
445
+ 2. 用浏览器开发者工具观察该请求:`docs.mdPreview` 的返回是 `{ kind: 'markdown-preview-too-large', ... }`,**几毫秒内**就回来(不传输整个文件),期间目录列表、保存、传输进度等其它操作不被卡住。
446
+ 3. 同一个正常大小的 Markdown 连续打开两次:第二次明显更快(Host 侧按内容哈希缓存最近 3 份预览),两次渲染结果必须完全一致。
447
+ 4. 在**文件标签页**里打开一个 Markdown(例如从聊天里的占位路径链接转交过来的那份):应出现文档面板的工具栏(MARKDOWN 徽标 + 预览 / 导出 PDF / 保存),而不是只有代码编辑器;点「编辑」可改、可保存。
448
+ 5. 目录栏标题右侧的可用空间芯片:点「刷新目录」后它的 title(可用 / 已用 / 总量)随之更新,不再永远停在首次打开面板时的数值。
449
+ 6. 把窗口最小化或切到别的应用 30 秒再回来:占位目录转交仍在工作(后台不轮询、回到前台立刻补一次),并且这段时间没有产生额外的网络请求。