dsh-remote-vs 0.15.0 → 0.16.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/README.en.md CHANGED
@@ -91,7 +91,7 @@ extra configuration is needed.
91
91
 
92
92
  | Capability | Notes |
93
93
  | --- | --- |
94
- | Explorer | Lazy tree + one click expands/collapses a directory + hidden-files toggle; **new: a 150 ms hover prefetches** that folder's listing (the expand paints from cache and revalidates in the background; if the prefetch is still in flight, the click waits for it and shows the loading line like a cold directory). On the Host every browse request shares **one long-lived SFTP session**, cutting a listing from two round trips to one (**the first one after a cold start or after the 2 idle minutes still pays the channel open**); context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference / **download to local** (files stream to this machine; a directory **or a multi-selection** is archived on the remote host as one `.tar.gz` and streamed, so nothing is buffered in Host memory; a native **Save as** dialog picks the destination when the browser supports it, otherwise the browser's download folder; a bottom-right **download panel** shows live progress, allows cancel, and reports completion/failure; the search-hit menu offers it too; a download ends in one of three honest states — **saved / handed to the browser / failed** — and a hand-off never reads as "done", nor does a Host failure get saved as a file; the tree's empty area has its own context menu (new / upload / paste) and uploads, pastes and drops are **serialized** (a second transfer is refused with an explanation); the tree is keyboard-operable (`↑↓` move, `←→` collapse/expand, `Enter` open, `Shift+F10` menu) and dialogs trap focus and close on `Esc`); git status colours and folder roll-up marks |
94
+ | Explorer | Lazy tree + one click expands/collapses a directory + hidden-files toggle; **new: a 150 ms hover prefetches** that folder's listing (the expand paints from cache and revalidates in the background; if the prefetch is still in flight, the click waits for it and shows the loading line like a cold directory). On the Host every browse request shares **one long-lived SFTP session**, cutting a listing from two round trips to one (**the first one after a cold start or after the 2 idle minutes still pays the channel open**); context menu: new / rename / delete / copy / move / paste / find in folder / insert `@` reference / **download to local** (files stream to this machine; a directory **or a multi-selection** is archived on the remote host as one `.tar.gz` and streamed, so nothing is buffered in Host memory; a native **Save as** dialog picks the destination when the browser supports it, otherwise the browser's download folder; a bottom-right **download panel** shows live progress, allows cancel, and reports completion/failure; the search-hit menu offers it too; a download ends in one of three honest states — **saved / handed to the browser / failed** — and a hand-off never reads as "done", nor does a Host failure get saved as a file; the tree's empty area has its own context menu (new / upload / paste) and uploads, pastes and drops are **serialized** (a second transfer is refused with an explanation); the tree is keyboard-operable (`↑↓` move, `←→` collapse/expand, `Enter` open, `Shift+F10` menu) and dialogs trap focus and close on `Esc`); git status colours and folder roll-up marks; **drag-hover expand**: while dragging a row or dropping OS files, resting the pointer on a collapsed directory for ~650 ms opens it (spring-loaded folder, so the drop lands inside the folder you just revealed; cancelling the drag leaves nothing half-open) |
95
95
  | Transfer speed | Uploads/downloads use a **256 KiB × 32 in-flight window** over SSH (pipelined SFTP): single-file downloads and drag-and-drop uploads run ~8× faster than one stream, and the helper push (45 MB) uses parallel `fastPut` too; large uploads are no longer killed by a 60 s deadline (progress watchdog instead). A **download above 4 MiB gets a second dedicated SFTP channel** (one SSH channel caps its window at 2 MiB, so each extra channel adds a window): an interleaved same-process A/B measured **about 1.1–1.4×** (medians of 1.08–1.43× across samples, link-dependent; raw read probes 1.6–1.8× — the product opens two channels, not four); small files keep one channel and one less channel slot, and uploads stay single-channel (the remote write path is the bound, extra channels gain nothing) |
96
96
  | Search | Two modes: **file names** (remote `find`) and **contents** (remote `grep`). Content mode has a scope folder, `Aa` (case) / `ab_` (whole word) / `.*` (regex), results grouped per file with match highlights, and clicking a hit jumps to that line; **content mode can be aborted** (changing or clearing the query kills the running remote `grep`; an older Host without the streaming route degrades to a one-shot, non-cancellable query), success with stderr warnings is reported above the results, and a **directory** hit in name mode is revealed in the tree instead of being opened as a file |
97
97
  | Connection status and offline read-only | The top bar and the editor info bar show the current workspace's SSH link state (**connection OK / connection issue / ready, connects on demand**): a drop is no longer silent — open editor tabs keep their cached content and turn **read-only** (saves are blocked with an explanation), the tree keeps showing cached directories while background refreshes stay quiet, and uncached directories say they are offline. When the link recovers, directories, git status, **unmodified file tabs and read-only diff tabs** refresh automatically (tabs with unsaved edits are left alone and the user is told). An errored link is retried at most three times, 30 s apart, then the chip is a manual retry control. While the link is down, "Undo this change" and the diff's hunk actions are blocked too; **a single operation's deadline is NOT treated as a broken link** — the chip stays ok and only that operation fails, with the real reason; when the link is down and the workspace has no cache, the SCM panel says it cannot read instead of sitting on "loading". **No cross-reload persistent cache** (remote source never lands on disk) — a deliberate privacy trade-off |
@@ -99,6 +99,7 @@ extra configuration is needed.
99
99
  | Session change review | The **collapsible** panel above the composer: what THIS SESSION changed (one row per file, file-type icon, `+a −b` on the right); clicking a file opens it in the remote editor with **line shading plus character-level inline diff**, `n/N ↑↓` jumps between change points, and hovering a changed line offers **Undo this change** (remote `git apply -R`). See "Session change review" below |
100
100
  | Side-by-side diff | Panes stay **exactly equal** + per-hunk buttons in the middle gutter + a **top horizontal scrollbar** (a very long line can no longer break the symmetry) + pinned line numbers, **rendering only the rows inside the viewport** (a 3000-line file goes from 9000 row containers to ~174, with exactly the same scroll range as a full render); switch between "before / after", and the after side is editable and savable (the save writes the working-tree file back; a diff above 8MiB is read-only, so a truncated prefix can never be written over the real file) |
101
101
  | Commit graph | SVG branch/merge graph; selecting a commit opens the **resizable / expandable commit-details pane** below it with three views: **Commit details** (subject, author, time, full hash + copy, parents, refs, message body, checkout), **Contents** (changed files grouped by directory, collapsible and path-filterable; click for the diff, right-click or the row button to open in the editor), **Diff** (only the first ~1500 rows start expanded, later files start folded; both line numbers, `+/−` counts, line wrapping, previous/next-file navigation, and copy of one file's patch or the whole patch). Merge commits are shown against their **first parent** (git lists no files for a merge otherwise) |
102
+ | AI review | A single-file diff OR a **whole commit** can be handed to the conversation with one click — the request is **appended to the composer draft only** (nothing is sent automatically, and you can edit it first): a diff up to 32 KiB is inlined verbatim; a larger one (or one silently truncated at the 2 MB cap) becomes a summary request — file/commit facts + hunk headers + "fetch it yourself with `git show`" (a 2 MB diff is hundreds of thousands of tokens, so inlining it is pointless); an untracked or binary file is passed by path and the model reads it. Entries: the side-by-side diff toolbar and the commit pane's Diff toolbar; the button is disabled with the reason when the current session is not bound to this remote workspace, or the host exposes no conversation input channel |
102
103
  | Multi-tab editor | Open/save/reload, dirty marks, several files at once; **saves are atomic** (side file + rename, writing through symlinks and keeping the mode bits); **a save is checked against the remote baseline** — when the file was written by someone else (an agent through the transparent route, a terminal, another editor) since it was opened, the save is refused and offers "overwrite / load remote version / show difference" instead of overwriting silently; image preview, Markdown/HTML preview (source vs preview); closing a tab, reloading and switching workspace all **ask first** when there are unsaved edits (a workspace switch clears every tab, so it asks); `Ctrl+S` works globally, even when the editor is not focused; **a page reload reopens the file tabs you had** (per workspace, at most 12; paths only, never contents; tabs that no longer open are skipped and counted; caret and scroll position are not restored) |
103
104
  | Floating editor | Three entries: "Open in floating editor" in the file-tree / search-hit / source-control context menus, plus **double-clicking the "remote editor" tab** to float the editor as it stands (same tabs, previews, diff, find and change marks — not a second, thinner editor). Drag the title bar to move, drag any of the eight edges/corners to resize, maximize/restore (or double-click the title bar); **minimize to a draggable floating ball** (dirty dot on it, click or press Enter to restore, drag to park it anywhere); `Ctrl+wheel` zooms the editor text. Position, size, font size and the ball's spot survive a page refresh |
104
105
  | Syntax highlighting | VS Code **Dark+ / Light+** palettes; covers java/aidl/smali, c/c++, go, rust, js/ts, json, py, yaml, xml, html/css, md, sh, properties/rc/toml, diff …; a **fallback colorer** takes over when no grammar matches, so a file is never left monochrome. Honest caveat: kotlin / gradle / smali are coloured by the Java grammar (no dedicated package), which gets keywords, strings and comments right but does not split their own syntax |
@@ -172,6 +173,7 @@ dsh_remote_vs/
172
173
  │ ├── RemoteRoot.tsx # sidebar surface: VS Code activity rail (explorer/search/SCM/history/editor/terminal/workspaces)
173
174
  │ ├── RemoteEditorView.tsx # conversation-view surface (the "remote editor" tab next to 对话/轨迹, full width)
174
175
  │ ├── RemoteExplorer.tsx # explorer: tree + context menu + file ops + @ references + status marks
176
+ │ ├── drag-expand.ts # drag-hover auto-expand (pure state machine, shared by both drag paths)
175
177
  │ ├── SearchView.tsx # search panel: name / content modes + Aa/ab_/.* + grouped hits + jump
176
178
  │ ├── EditorPane.tsx # editor pane: tabs + info bar (build stamp / tok count) + image/MD/HTML preview
177
179
  │ ├── FloatingEditorWindow.tsx # floating window frame (title-bar drag/8-way resize/maximize/ball minimize/font zoom)
@@ -200,6 +202,7 @@ dsh_remote_vs/
200
202
  │ │ ├── tokenize.ts / markdown.tsx # read-only pane tokenizer / dependency-free markdown renderer
201
203
  │ ├── NativeExplorer.tsx# native page type definition + seat body (no-sidebar fallback)
202
204
  │ ├── composer.ts / use-remote-chat-target.ts / selection-popup.ts # remote @refs/selection-to-chat
205
+ │ ├── ai-review.ts # AI review prompt builder (single diff / whole commit, byte tiers, pure)
203
206
  │ ├── api.ts # typed fetch wrapper over /api/dsh-remote
204
207
  │ ├── HostsView / WorkspacesView / WorkspaceWizard / TerminalView / XTerm / Dialog
205
208
  │ ├── SettingsHosts.tsx # settings occupants (host mgmt/binding list, self-fetching)
@@ -207,11 +210,12 @@ dsh_remote_vs/
207
210
  │ ├── RemoteDirectoryPicker.tsx# remote directory browser dialog
208
211
  │ └── i18n.ts / theme.ts / ui.tsx # bilingual dictionary/theme signal/shared styles
209
212
  ├── vendor/dsh-remote-helpers/ # helper seeds (shipped, seeded into cache at startup, see below)
210
- ├── docs/ # local-only working docs (never pushed to GitHub)
211
- │ ├── P2-PLAN.md # P2 architecture/phases/acceptance matrix (with per-item status)
212
- │ └── MAINTENANCE.md # local-only (.gitignore), not shipped: DSH upgrade impact + helper procedure
213
+ ├── docs/ # local-only working docs (only docs/media/ screenshots ship)
214
+ │ ├── MAINTENANCE.md # local-only (.gitignore), not shipped: upgrade impact, checklist, pitfalls, release
215
+ │ ├── VERSION-HISTORY.md # local-only: per-release change log (0.7.1 → 0.16.0)
216
+ │ └── GATES.md # local-only: local gate inventory and measured assertion counts
213
217
  ├── locale/ # bilingual plugin metadata
214
- └── lib/ # build output (gitignored, restart after link install to take effect)
218
+ └── lib/ # build output (**must be committed**; only .map is ignored; restart after link install)
215
219
  ```
216
220
 
217
221
  `vendor/dsh-remote-helpers/` (committed) holds helper seeds: at startup the plugin spreads them into
@@ -355,7 +359,7 @@ over helper RPC (fs) / ssh2 (processes), local stays untouched; both share one H
355
359
  - Disconnects: in-flight calls are not replayed; new calls reconnect automatically; the link state is shown explicitly in the top bar / editor info bar, and while it is down the editor and cached directories stay **read-only visible** (see "Connection status and offline read-only")
356
360
  - Verify: `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`
357
361
  (real remote + real Cordis + real router classes, 61/61; P0 routing and GUI need a Host restart + smoke pass)
358
- - Details: `docs/P2-PLAN.md` (§8 acceptance matrix with per-item status)
362
+ - Details: the local-only `docs/MAINTENANCE.md` (§2 coupling points, §3 checklist)
359
363
 
360
364
  ## Self-built helper (P1)
361
365
 
@@ -377,7 +381,7 @@ Upstream never published helper binaries (all Release assets are empty), so this
377
381
  - Passwords / key passphrases are stored in plaintext in `dsh-remote.json` (0600) — same trust model as the existing SSH plugin.
378
382
  - Pushed artifacts are sha256-verified both ways (tarball in, binary out); the helper install dir is separate from workspaces; the sidecar's `version`, platform and tarball path are whitelist-validated (no unvalidated string is interpolated into a remote shell line), and a failed install keeps the previous version.
379
383
  - Host config writes are fsync'd and re-checked against a stamp (a concurrent Desktop/Web edit inside the read-modify-write window is replayed instead of silently overwritten).
380
- - Remote sessions may read explicit local absolute paths (the tool spill-file contract requires it); acceptable under the same model trust — see `docs/P2-PLAN.md` §4 note.
384
+ - Remote sessions may read explicit local absolute paths (the tool spill-file contract requires it); acceptable under the same model trust — a known trade-off recorded in the local maintenance notes.
381
385
 
382
386
  ## Development
383
387
 
@@ -444,7 +448,7 @@ tsc, to the bundler and to jsdom — this fixture is the only place they reprodu
444
448
  > exactly why "57 call sites" and "55 checks run" differ by 2).
445
449
 
446
450
  The live-host regression is still `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`.
447
- Before touching anything for a new DSH release, read the local-only `docs/MAINTENANCE.md` (§2 coupling points, §3 checklist) — it is gitignored, so a clone will not have it. After any change (host half or client half) the mandatory steps are: `pnpm run build` → `node scripts/verify-lib.mjs` (entries present, committed and loadable) → restart `dsh web`; and before committing, run every local gate under `scripts/` (`node scripts/check-*.mjs`, 45 of them at the time of writing, plus `verify-lib.mjs` and the shared TS loader `_ts-hook.mjs`).
451
+ Before touching anything for a new DSH release, read the local-only `docs/MAINTENANCE.md` (§2 coupling points, §3 checklist) — it is gitignored, so a clone will not have it. After any change (host half or client half) the mandatory steps are: `pnpm run build` → `node scripts/verify-lib.mjs` (entries present, committed and loadable) → restart `dsh web`; and before committing, run every local gate under `scripts/` (`node scripts/check-*.mjs`, 49 of them at the time of writing, plus `verify-lib.mjs` and the shared TS loader `_ts-hook.mjs`).
448
452
 
449
453
  ## License
450
454
 
package/README.md CHANGED
@@ -76,7 +76,7 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
76
76
 
77
77
  | 能力 | 说明 |
78
78
  | --- | --- |
79
- | 资源管理器 | 懒加载目录树 + 单击目录即展开/折叠 + 隐藏文件开关;**新增悬停 150 ms 预取**下一层列表(展开时先用缓存上屏、后台再校验;预取仍未返回时点开会等它,与冷启动一样显示加载行);Host 侧浏览请求复用**一条常驻 SFTP 会话**,一次列目录的往返从 2 个降到 1 个(**冷启动或空闲 2 分钟关闭后的第一次仍要开会话**);右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@` 引用/**下载到本地**(文件流式下载、目录或**多选**在远端打包成 `.tar.gz` 流式下载,不占 Host 内存;浏览器支持时先弹**另存为**对话框选保存路径,不支持时落到默认下载目录;右下角**下载面板**显示实时进度、可取消,并提示完成/失败;搜索结果右键同样支持;下载结果分「已保存 / 已交给浏览器 / 失败」三态,交给浏览器后**不再显示成已完成**,Host 失败也不会被当成文件存下;树空白区也有右键菜单(新建/上传/粘贴),上传、粘贴、拖放等写操作**串行**(另一个传输进行中会拒绝并提示);键盘可用(`↑↓` 选择、`←→` 折叠/展开、`Enter` 打开、`Shift+F10` 菜单),对话框有焦点陷阱与 `Esc` 关闭);git 状态色与文件夹聚合标记 |
79
+ | 资源管理器 | 懒加载目录树 + 单击目录即展开/折叠 + 隐藏文件开关;**新增悬停 150 ms 预取**下一层列表(展开时先用缓存上屏、后台再校验;预取仍未返回时点开会等它,与冷启动一样显示加载行);Host 侧浏览请求复用**一条常驻 SFTP 会话**,一次列目录的往返从 2 个降到 1 个(**冷启动或空闲 2 分钟关闭后的第一次仍要开会话**);右键菜单:新建/改名/删除/复制/移动/粘贴/在此文件夹查找/插入 `@` 引用/**下载到本地**(文件流式下载、目录或**多选**在远端打包成 `.tar.gz` 流式下载,不占 Host 内存;浏览器支持时先弹**另存为**对话框选保存路径,不支持时落到默认下载目录;右下角**下载面板**显示实时进度、可取消,并提示完成/失败;搜索结果右键同样支持;下载结果分「已保存 / 已交给浏览器 / 失败」三态,交给浏览器后**不再显示成已完成**,Host 失败也不会被当成文件存下;树空白区也有右键菜单(新建/上传/粘贴),上传、粘贴、拖放等写操作**串行**(另一个传输进行中会拒绝并提示);键盘可用(`↑↓` 选择、`←→` 折叠/展开、`Enter` 打开、`Shift+F10` 菜单),对话框有焦点陷阱与 `Esc` 关闭);git 状态色与文件夹聚合标记;**拖拽悬停展开**:拖动行或拖入系统文件时,指针在收起目录上停留约 650 ms 就自动展开该目录(spring-loaded folder,松手即落在已展开的目标里;中途取消不会留下自动展开) |
80
80
  | 传输性能 | 上传/下载走 SSH 的 **256 KiB × 32 并发窗口**(ssh2 pipelined SFTP):单文件下载与拖放上传比单流快约 8 倍,helper 推送(45 MB 包)同样走并行 `fastPut`;大文件上传不再被 60 秒期限误杀(改用进度看门狗)。**大于 4 MiB 的下载再开一条专用 SFTP 通道**(单条 SSH 通道的窗口上限是 2 MiB,多一条通道多一个窗口):同进程交错 A/B 实测**约 1.1–1.4×**(多次采样中位 1.08–1.43×,随链路波动;原始读探针 1.6–1.8×,产品只开两条通道,不开四条);小文件不开第二条,省一个通道槽。上传保持单通道(服务端写入是瓶颈,多通道无收益) |
81
81
  | 搜索 | 两档:**文件名**(远端 `find`)与**内容**(远端 `grep`)。内容档带范围目录、`Aa`(大小写)/`ab_`(全字)/`.*`(正则)、结果按文件分组、命中高亮,点条目跳到该行;**内容档可中止**(改写或清空查询会终止正在跑的远端 `grep`;老 Host 无流式路由时退化为不可取消的一次性查询),成功但远端给了 stderr 警告时在结果上方提示;文件名档里命中**目录**时在树中定位,而不是当文件打开 |
82
82
  | 连接状态与离线只读 | 顶部栏与编辑器信息栏显示当前工作区的 SSH 连接状态(**连接正常 / 连接异常 / 就绪·按需连接**):断线不再静默——已打开的编辑器标签保留缓存内容并切为**只读**(保存被拦截并说明原因),目录树继续显示已缓存目录、后台刷新静默,未缓存目录显示离线提示;连接恢复后自动刷新目录、Git 状态、**未修改的文件标签和只读 diff 标签**(有未保存改动的标签不动并提示)。错误态不会无限重连:每 30 秒最多自动重试 3 次,之后点状态图标手动重试。断线时「撤销这处改动」和 diff 的 hunk 操作同样被拦截;**单次操作的超时(deadline)不当作链路故障**——chip 保持正常,只有该次操作失败并说明原因;断线且该工作区没有缓存时,SCM 面板直接说明无法读取,而不是停在「加载中」。**不做**跨页面刷新的持久化缓存(远端源码不落盘),这是有意的隐私取舍 |
@@ -84,6 +84,7 @@ Host 转发(终端按 `__DSH_TRANSPORT__.streamBaseUrl` 解析地址),无
84
84
  | 会话改动审阅 | 输入框上方的**可收纳**面板,按**会话**列出改了什么(一行一个文件、文件类型图标、右侧 `+a −b`);点文件在远程编辑器里打开并画**整行着色 + 行内字符级差异**,右上角 `n/N ↑↓` 跳改动点,悬浮改动行可**撤销**这处改动(远端 `git apply -R`)。详见下文「会话改动审阅」 |
85
85
  | 并排 Diff | 左右**严格等分** + 中间 gutter 逐 hunk 按钮 + **顶部横向滚动条**(一行很长也不会破坏对称)+ 行号钉在左侧,**只渲染视口内的行**(3000 行文件从 9000 个行容器降到约 174 个,滚动范围与整篇渲染完全一致);可切「变更前 / 变更后」,变更后可编辑并保存(保存写回工作树文件;超过 8MiB 的差异只读,避免把截断内容写回去) |
86
86
  | 提交图 | SVG 分支/合并图;点选提交后,下方**可调高度 / 可全屏**的提交详情面板给出三个视图:**提交详情**(标题、作者、时间、完整哈希+复制、父提交、ref、正文、检出)、**内容**(改动文件按目录分组、可折叠、可过滤,单击看差异、右键或行尾按钮在编辑器中打开)、**差异**(默认只展开前约 1500 行、其余文件折叠;双行号、`+/−` 计数、自动换行、上一/下一个文件、复制文件补丁或整个补丁)。合并提交按**首父**展示(git 对 merge 默认不给文件列表) |
87
+ | AI 审查 | 单文件 diff 与**整个提交**都能一键把审查请求追加到对话草稿(**只预填,不自动发送**,发送前可自行修改):≤32 KiB 内嵌完整 diff;更大或被 2 MB 静默截断时改为「文件/提交信息 + 变更块头 + 自行 `git show`」的摘要式请求(2 MB diff 约几十万 token,硬塞没有意义);未跟踪/二进制文件只给路径让 AI 自行读取。入口:并排 diff 工具栏、提交详情「差异」工具栏;当前会话不在该远端工作区、或宿主没有可用的对话输入通道时按钮禁用并写明原因 |
87
88
  | 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;**保存是原子的**(侧文件 + 重命名,写穿符号链接并保留权限位);**保存前校验远端基线**:文件在打开之后被别人(Agent 的透明路由、终端、另一个编辑器)改过时保存被拒绝,并给出「覆盖 / 载入远端版本 / 查看差异」,不再静默覆盖;图片预览、Markdown/HTML 预览(源码/预览切换);关闭标签、重载、切工作区遇到未保存改动都会**先确认**(切工作区会清空全部标签,所以先问);`Ctrl+S` 全局生效,焦点不在编辑器里也能保存;**刷新页面后自动恢复上次打开的文件标签**(按工作区记,最多 12 个;只存路径不存内容,打不开的会跳过并提示数量;光标与滚动位置不恢复) |
88
89
  | 悬浮编辑器 | 三个入口:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,以及**双击会话视图的「远程编辑器」标签**把当前编辑器整体浮出(同一套标签、预览、Diff、查找、改动标记,不是另写一个编辑器)。窗口可拖标题栏移动、拖八个边角缩放、最大化/还原、双击标题栏切换最大化;**最小化成一个可拖动的悬浮球**(球上有未保存脏点,点一下或按 Enter 恢复,拖动可换位置);`Ctrl+滚轮` 缩放编辑器字号;位置、大小、字号和球的位置跨刷新记住 |
89
90
  | 语法高亮 | VS Code **Dark+ / Light+** 配色;覆盖 java/aidl/smali、c/c++、go、rust、js/ts、json、py、yaml、xml、html/css、md、sh、properties/rc/toml、diff 等;**兜底着色器**在语法包没命中时自动接管,不会出现整篇无色。诚实说明:kotlin / gradle / smali 用 Java 语法着色(没有专用语法包),效果是关键字/字符串/注释正确、专有语法不细分 |
@@ -157,6 +158,7 @@ dsh_remote_vs/
157
158
  │ ├── RemoteRoot.tsx # 右侧栏挂载面:VS Code 式活动栏(资源管理器/搜索/SCM/提交图/编辑器/终端/工作区)
158
159
  │ ├── RemoteEditorView.tsx # 会话视图挂载面(与 对话/轨迹 并列的「远程编辑器」标签,整屏宽)
159
160
  │ ├── RemoteExplorer.tsx # 资源管理器:树 + 右键菜单 + 文件操作 + @ 引用 + 状态标记
161
+ │ ├── drag-expand.ts # 拖拽悬停自动展开目录(纯状态机,两条拖拽路径共用)
160
162
  │ ├── SearchView.tsx # 搜索面板:文件名 / 内容 两档 + Aa/ab_/.* + 分组结果 + 跳转
161
163
  │ ├── EditorPane.tsx # 编辑器面板:多标签 + 信息栏(构建戳/tok 计数)+ 图片/MD/HTML 预览
162
164
  │ ├── FloatingEditorWindow.tsx # 悬浮编辑器窗口(标题栏拖动/八向缩放/最大化/最小化悬浮球/字号缩放)
@@ -185,6 +187,7 @@ dsh_remote_vs/
185
187
  │ │ ├── tokenize.ts / markdown.tsx # 只读面板分词器 / 零依赖 Markdown 渲染
186
188
  │ ├── NativeExplorer.tsx# 原生页类型定义 + seat 正文(无 sidebar 兜底)
187
189
  │ ├── composer.ts / use-remote-chat-target.ts / selection-popup.ts # 远端 @引用/选中加对话
190
+ │ ├── ai-review.ts # AI 审查 prompt 构造(单文件 diff / 整提交,按字节分级,纯函数)
188
191
  │ ├── api.ts # /api/dsh-remote 类型化 fetch 封装
189
192
  │ ├── HostsView / WorkspacesView / WorkspaceWizard / TerminalView / XTerm / Dialog
190
193
  │ ├── SettingsHosts.tsx # 设置两节 occupant(主机管理/绑定列表,自取数)
@@ -192,11 +195,12 @@ dsh_remote_vs/
192
195
  │ ├── RemoteDirectoryPicker.tsx# 远端目录浏览弹窗
193
196
  │ └── i18n.ts / theme.ts / ui.tsx # 双语词典/主题信号/共享样式
194
197
  ├── vendor/dsh-remote-helpers/ # helper 种子(随包发布,启动铺缓存,见下)
195
- ├── docs/ # 本地工作文档(不推送 GitHub)
196
- │ ├── P2-PLAN.md # P2 架构/分期/验收矩阵(含逐项状态)
197
- │ └── MAINTENANCE.md # 本地私有(.gitignore),不入库:DSH 升级影响面 + helper 升级流程
198
+ ├── docs/ # 本地工作文档(不推送 GitHub;只有 docs/media/ 的截图随仓库公开)
199
+ │ ├── MAINTENANCE.md # 本地私有(.gitignore,不入库):升级影响面/检查清单/踩坑/发布流程
200
+ │ ├── VERSION-HISTORY.md # 本地私有:逐版本变更纪要(0.7.1 → 0.16.0)
201
+ │ └── GATES.md # 本地私有:本地门禁清单与实跑条数
198
202
  ├── locale/ # 插件元信息双语
199
- └── lib/ # 构建产物(gitignored,link 安装后重启即生效)
203
+ └── lib/ # 构建产物(**必须入库**,只有 .map 忽略;link 安装后重启即生效)
200
204
  ```
201
205
 
202
206
  `vendor/dsh-remote-helpers/`(入库)是 helper 种子:插件启动时自动铺到
@@ -314,7 +318,7 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
314
318
  - 断线:在途不重放;新调用自动重连;连接状态由顶部栏/编辑器信息栏指示器显式显示,断线期间编辑器与已缓存目录**只读可见**(见「连接状态与离线只读」)
315
319
  - 验证:`npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`
316
320
  (真远端 + 真 Cordis + 真路由类,61/61;P0 路由与 GUI 需重启 Host 后冒烟)
317
- - 详见 `docs/P2-PLAN.md`(§8 验收矩阵逐项状态)
321
+ - 详见本地维护文档 `docs/MAINTENANCE.md`(§2 逐项耦合点 + §3 升级清单)
318
322
 
319
323
  ## Helper 自编译(P1)
320
324
 
@@ -338,7 +342,7 @@ helper RPC(fs)/ ssh2(进程),本地一切不变;两者同 Host、共
338
342
  - 密码 / 私钥口令以明文保存在 `dsh-remote.json`(0600),与现有 SSH 插件同一信任模型。
339
343
  - 推送物逐包验 sha256(tarball 进、binary 出,双重校验);helper 安装目录与工作区分开;sidecar 的 `version`、平台与 tarball 路径都走白名单校验(不内插未校验字符串到远端 shell 行),安装失败会保留上一版。
340
344
  - 主机配置写入走 fsync + 变更戳复核(读-改-写窗口内被别的进程改过会重放,而不是静默覆盖)。
341
- - 远端会话可读显式本机绝对路径(工具 spill 文件契约要求);同模型信任下可接受,见 `docs/P2-PLAN.md` §4 备注。
345
+ - 远端会话可读显式本机绝对路径(工具 spill 文件契约要求);同模型信任下可接受,属已知取舍,本地维护文档有记录。
342
346
 
343
347
  ## 开发
344
348
 
@@ -397,7 +401,7 @@ node .spike/letter-check.mjs # 状态字母:未跟踪 ? 与冲突 U 不再
397
401
  > 失败时才触发,所以「调用点 57」与「跑出来 55」本来就该差 2)。
398
402
 
399
403
  真机回归仍是 `npx tsc -p tsconfig.scratch.json && node .spike/build/.spike/p2-router.js`。
400
- DSH 发新版时先读本地维护文档 `docs/MAINTENANCE.md`(§2 逐项耦合点 + §3 升级清单)再动手;该文件被 .gitignore,克隆仓库的人看不到。改动后(无论 host 半还是 client 半)的必做动作是:`pnpm run build` → `node scripts/verify-lib.mjs`(核对 `lib/` 齐全、已入库、能加载)→ 重启 `dsh web`,提交前把 `scripts/` 下的本地门禁逐个跑一遍(`node scripts/check-*.mjs`,当前 45 个;另有 `verify-lib.mjs` 与共享 TS 加载器 `_ts-hook.mjs`)。
404
+ DSH 发新版时先读本地维护文档 `docs/MAINTENANCE.md`(§2 逐项耦合点 + §3 升级清单)再动手;该文件被 .gitignore,克隆仓库的人看不到。改动后(无论 host 半还是 client 半)的必做动作是:`pnpm run build` → `node scripts/verify-lib.mjs`(核对 `lib/` 齐全、已入库、能加载)→ 重启 `dsh web`,提交前把 `scripts/` 下的本地门禁逐个跑一遍(`node scripts/check-*.mjs`,当前 49 个;另有 `verify-lib.mjs` 与共享 TS 加载器 `_ts-hook.mjs`)。
401
405
 
402
406
  ## 开源许可
403
407