dsh-remote-vs 0.8.9 → 0.9.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 +15 -2
- package/README.md +12 -1
- package/lib/client.js +1235 -53
- package/lib/types/client/CodeEditor.d.ts +27 -1
- package/lib/types/client/FloatingEditorWindow.d.ts +20 -0
- package/lib/types/client/FloatingPlaceholder.d.ts +9 -0
- package/lib/types/client/RemoteEditorView.d.ts +4 -0
- package/lib/types/client/float-editor.d.ts +123 -0
- package/lib/types/client/float-tab-trigger.d.ts +24 -0
- package/lib/types/client/live-editor.d.ts +94 -0
- package/lib/types/client/store.d.ts +95 -6
- package/package.json +1 -1
- package/src/client/CodeEditor.tsx +95 -8
- package/src/client/EditorPane.tsx +45 -24
- package/src/client/FloatingEditorWindow.tsx +494 -0
- package/src/client/FloatingPlaceholder.tsx +22 -0
- package/src/client/RemoteEditorView.tsx +7 -2
- package/src/client/RemoteExplorer.tsx +16 -0
- package/src/client/RemoteRoot.tsx +15 -6
- package/src/client/SearchView.tsx +10 -3
- package/src/client/float-editor.ts +271 -0
- package/src/client/float-tab-trigger.ts +51 -0
- package/src/client/i18n.ts +28 -0
- package/src/client/index.tsx +48 -1
- package/src/client/live-editor.ts +155 -0
- package/src/client/remote-file-open.ts +2 -2
- package/src/client/scm/ScmPanel.tsx +42 -1
- package/src/client/store.tsx +274 -16
- package/src/client/vsc/editor-theme.ts +6 -1
- package/src/client/vsc/vsc.css +235 -0
package/README.en.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
[中文](./README.md) | English
|
|
6
6
|
|
|
7
7
|
SSH host management inside the DSH Host process + helper push pipeline + a **VS Code-style remote
|
|
8
|
-
workbench** (explorer / search / source control / commit graph / multi-tab editor /
|
|
9
|
-
multiple terminals). Hosts live in DSH Settings ("Remote hosts"); with `dsh-better-sidebar` installed
|
|
8
|
+
workbench** (explorer / search / source control / commit graph / multi-tab editor / floating editor /
|
|
9
|
+
side-by-side diff / multiple terminals). Hosts live in DSH Settings ("Remote hosts"); with `dsh-better-sidebar` installed
|
|
10
10
|
there is an extra standalone "Remote" tab, otherwise it falls back to a native right-Sidebar "Remote"
|
|
11
11
|
page (same content, self-opened from the guide, per-session instances). The editor is ALSO mounted into
|
|
12
12
|
the conversation view slot as a "远程编辑器" (remote editor) tab next to "对话 / 轨迹", so the code area is
|
|
@@ -69,6 +69,7 @@ it cannot be waived from the dependency side, only removed from the tree. Then r
|
|
|
69
69
|
| 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 |
|
|
70
70
|
| Commit graph | SVG branch/merge graph + commit details + click a commit to expand its changed files + open the diff |
|
|
71
71
|
| Multi-tab editor | Open/save/reload, dirty marks, several files at once; image preview, Markdown/HTML preview (source vs preview) |
|
|
72
|
+
| 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 |
|
|
72
73
|
| 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 |
|
|
73
74
|
| Find | In-editor `Ctrl+F` (`Aa` / `ab_` / `.*`, `3/17` count, ↑↓, `F3`/`Shift+F3`, `Esc`); **selected text is carried into the box by `Ctrl+F`**; the widget is pinned to the top-right and does not scroll away |
|
|
74
75
|
| Jump | Clicking a search hit opens the file at that line, centres it and **lights the landing line** (fades after ~2.6s); repeat jumps in the same file work |
|
|
@@ -140,6 +141,11 @@ dsh_remote_vs/
|
|
|
140
141
|
│ ├── RemoteExplorer.tsx # explorer: tree + context menu + file ops + @ references + status marks
|
|
141
142
|
│ ├── SearchView.tsx # search panel: name / content modes + Aa/ab_/.* + grouped hits + jump
|
|
142
143
|
│ ├── EditorPane.tsx # editor pane: tabs + info bar (build stamp / tok count) + image/MD/HTML preview
|
|
144
|
+
│ ├── FloatingEditorWindow.tsx # floating window frame (title-bar drag/8-way resize/maximize/ball minimize/font zoom)
|
|
145
|
+
│ ├── float-tab-trigger.ts # double-click on the "remote editor" tab (the tab row is the host's, so label-based)
|
|
146
|
+
│ ├── FloatingPlaceholder.tsx # "docked elsewhere" placeholder + dock button left on the other surfaces
|
|
147
|
+
│ ├── float-editor.ts # window geometry/resize/surface rules (pure; driven directly by the self-check)
|
|
148
|
+
│ ├── live-editor.ts # live buffer + scroll/caret handoff across a surface change
|
|
143
149
|
│ ├── CodeEditor.tsx # CodeMirror wrapper: grammar table/theme/find widget/jump/fallback wiring
|
|
144
150
|
│ ├── scm/ # ── source control ──
|
|
145
151
|
│ │ ├── ScmPanel.tsx # changes/staged/untracked + per-file and per-hunk actions + commit box
|
|
@@ -202,6 +208,13 @@ Both surfaces share one state module (`store.tsx`): **the sidebar "Remote" page*
|
|
|
202
208
|
- **Editor**: tabs plus an info bar (path, language, **build stamp**, `tok N` coloured-token count,
|
|
203
209
|
saved state, reload/save). Those three marks exist for troubleshooting: the stamp answers "is the
|
|
204
210
|
browser running the bundle I just built?", `tok 0` answers "did a grammar match this extension?".
|
|
211
|
+
- **Floating editor**: "Open in floating editor" from the file-tree / search-hit / source-control context
|
|
212
|
+
menus, or double-click the "remote editor" tab, lifts the editor into a window above the shell (same tabs
|
|
213
|
+
and buffers; closing or docking puts it back on its original surface). Drag the title bar, resize from the
|
|
214
|
+
eight edges/corners, maximize/restore; **minimize to a 44px floating ball** (no full-width bar — park it in
|
|
215
|
+
any corner, click/Enter restores it, and it shows a dot while there are unsaved edits); zoom the text with
|
|
216
|
+
`Ctrl+wheel`; unsaved text is explicitly handed over between the main surface, the floating window and tab
|
|
217
|
+
switches (the disk-side baseline is kept separately, so the dirty mark can never be mistaken for saved).
|
|
205
218
|
- **Find and jump**: `Ctrl+F` opens a widget pinned to the editor's top-right corner
|
|
206
219
|
(`position: fixed` anchored to the editor's rect, so no ancestor scroller can carry it away);
|
|
207
220
|
a selection is carried into it by `Ctrl+F`; a jump from the search results centres the line and
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
中文 | [English](./README.en.md)
|
|
6
6
|
|
|
7
7
|
Host 进程内的 SSH 主机管理 + helper 推送流水线 + **VS Code 式远端工作台**
|
|
8
|
-
(资源管理器 / 搜索 / 源代码管理 / 提交图 / 多标签编辑器 / 并排 Diff / 多终端)。
|
|
8
|
+
(资源管理器 / 搜索 / 源代码管理 / 提交图 / 多标签编辑器 / 悬浮编辑器 / 并排 Diff / 多终端)。
|
|
9
9
|
主机配在 DSH 设置里(“远程主机”项);装了 `dsh-better-sidebar` 时另有
|
|
10
10
|
独立“远程”tab,没装则退到原生右侧栏“远程”页(同内容,引导页自助开,per-session 实例)。
|
|
11
11
|
编辑器还额外挂到会话视图槽,与“对话 / 轨迹”并列成一个**远程编辑器**标签,
|
|
@@ -60,6 +60,7 @@ dsh plugin --profile web add dsh-remote-vs
|
|
|
60
60
|
| 并排 Diff | 左右**严格等分** + 中间 gutter 逐 hunk 按钮 + **顶部横向滚动条**(一行很长也不会破坏对称)+ 行号钉在左侧,**只渲染视口内的行**(3000 行文件从 9000 个行容器降到约 174 个,滚动范围与整篇渲染完全一致);可切「变更前 / 变更后」,变更后可编辑并保存 |
|
|
61
61
|
| 提交图 | SVG 分支/合并图 + 提交详情 + 点击提交展开变更文件 + 进文件看 diff |
|
|
62
62
|
| 多标签编辑器 | 打开/保存/重载、脏标记、多文件标签并存;图片预览、Markdown/HTML 预览(源码/预览切换) |
|
|
63
|
+
| 悬浮编辑器 | 三个入口:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,以及**双击会话视图的「远程编辑器」标签**把当前编辑器整体浮出(同一套标签、预览、Diff、查找、改动标记,不是另写一个编辑器)。窗口可拖标题栏移动、拖八个边角缩放、最大化/还原、双击标题栏切换最大化;**最小化成一个可拖动的悬浮球**(球上有未保存脏点,点一下或按 Enter 恢复,拖动可换位置);`Ctrl+滚轮` 缩放编辑器字号;位置、大小、字号和球的位置跨刷新记住 |
|
|
63
64
|
| 语法高亮 | 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 语法着色(没有专用语法包),效果是关键字/字符串/注释正确、专有语法不细分 |
|
|
64
65
|
| 查找 | 编辑器内 `Ctrl+F`(`Aa`/`ab_`/`.*`、`3/17` 计数、↑↓、`F3`/`Shift+F3`、`Esc`);**选中文本按 `Ctrl+F` 直接填入**;查找框钉在右上角,滚动不带走 |
|
|
65
66
|
| 跳转 | 从搜索结果点进文件 → 跳到该行 + 垂直居中 + **落地行高亮**(约 2.6 秒后淡出);同文件反复跳都生效 |
|
|
@@ -131,6 +132,11 @@ dsh_remote_vs/
|
|
|
131
132
|
│ ├── RemoteExplorer.tsx # 资源管理器:树 + 右键菜单 + 文件操作 + @ 引用 + 状态标记
|
|
132
133
|
│ ├── SearchView.tsx # 搜索面板:文件名 / 内容 两档 + Aa/ab_/.* + 分组结果 + 跳转
|
|
133
134
|
│ ├── EditorPane.tsx # 编辑器面板:多标签 + 信息栏(构建戳/tok 计数)+ 图片/MD/HTML 预览
|
|
135
|
+
│ ├── FloatingEditorWindow.tsx # 悬浮编辑器窗口(标题栏拖动/八向缩放/最大化/最小化悬浮球/字号缩放)
|
|
136
|
+
│ ├── float-tab-trigger.ts # 双击「远程编辑器」标签浮出的文档级监听(标签属于宿主,只能按文字识别)
|
|
137
|
+
│ ├── FloatingPlaceholder.tsx # 编辑器浮出后,中心视图与侧栏留下的「已悬浮」占位 + 停靠按钮
|
|
138
|
+
│ ├── float-editor.ts # 悬浮窗几何/缩放/表面归属规则(纯函数,自检直接驱动)
|
|
139
|
+
│ ├── live-editor.ts # 表面切换时的编辑器缓冲区与滚动/光标交接
|
|
134
140
|
│ ├── CodeEditor.tsx # CodeMirror 封装:语法包表/主题/查找框/跳转/兜底着色接线
|
|
135
141
|
│ ├── scm/ # ── 源代码管理 ──
|
|
136
142
|
│ │ ├── ScmPanel.tsx # 变更/暂存/未跟踪 + 逐文件逐 hunk 操作 + 提交框
|
|
@@ -189,6 +195,11 @@ dsh_remote_vs/
|
|
|
189
195
|
不靠宿主传参。
|
|
190
196
|
- **编辑器**:多标签 + 信息栏(路径、语言、**构建戳**、`tok N` 着色 token 数、已保存状态、重载/保存)。
|
|
191
197
|
信息栏三个标记是给排障用的:构建戳判定"浏览器跑的是不是刚编的包",`tok 0` 判定语法包是否命中。
|
|
198
|
+
- **悬浮编辑器**:文件树 / 搜索结果 / 源代码管理右键「在悬浮编辑器中打开」,或双击「远程编辑器」标签,
|
|
199
|
+
编辑器整体浮到页面最上层的窗口里(同一份标签与缓冲区,关闭/停靠后回原表面)。标题栏可拖动、八个边角
|
|
200
|
+
可缩放、可最大化/还原;**最小化成一个 44px 悬浮球**(不占整条标题栏,可拖到任意角落,单击/Enter 恢复,
|
|
201
|
+
有未保存改动时球上带黄点),`Ctrl+滚轮` 调字号;未保存内容在「主界面 ↔ 悬浮窗」以及标签页切换之间
|
|
202
|
+
显式交接(磁盘侧基线单独保留,脏标记不会误判成已保存),不会被切换动作吞掉。
|
|
192
203
|
- **查找与跳转**:`Ctrl+F` 查找框固定右上角(`position: fixed` 锚定编辑器矩形,任何祖先滚动都不带走);
|
|
193
204
|
选中文本按 `Ctrl+F` 直接填入;从搜索结果跳转会**居中 + 落地行高亮**。
|
|
194
205
|
- **终端**:标签式多终端,session id 逐个持久化,刷新页面自动重连回原会话;**重连只接管、不改尺寸**
|