dsh-vscode-workbench 0.1.14 → 0.2.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 +4 -0
- package/README.md +8 -2
- package/lib/client.js +5014 -674
- package/lib/client.js.map +1 -1
- package/lib/index.js +832 -80
- package/lib/index.js.map +1 -1
- package/lib/types/client/ActivityBar.d.ts +24 -0
- package/lib/types/client/DshConversationPanel.d.ts +1 -1
- package/lib/types/client/FileIcon.d.ts +8 -0
- package/lib/types/client/Icon.d.ts +1 -3
- package/lib/types/client/MonacoEditor.d.ts +36 -0
- package/lib/types/client/Workbench.d.ts +19 -7
- package/lib/types/client/WorkspaceSwitcher.d.ts +13 -0
- package/lib/types/client/api.d.ts +2 -0
- package/lib/types/client/documentPreview.d.ts +10 -2
- package/lib/types/client/dshComposer.d.ts +21 -0
- package/lib/types/client/dshNavigation.d.ts +46 -0
- package/lib/types/client/fileIconMap.d.ts +2 -0
- package/lib/types/client/gitError.d.ts +2 -0
- package/lib/types/client/lsp.d.ts +27 -0
- package/lib/types/client/searchHighlight.d.ts +5 -0
- package/lib/types/client/typescriptProject.d.ts +20 -0
- package/lib/types/context.d.ts +15 -0
- package/lib/types/host.d.ts +37 -0
- package/lib/types/lsp.d.ts +54 -0
- package/lib/types/office.d.ts +17 -0
- package/lib/types/types.d.ts +5 -0
- package/lib/types/watch-ignore.d.ts +4 -0
- package/package.json +5 -2
- package/src/client/ActivityBar.tsx +152 -0
- package/src/client/DshConversationPanel.tsx +15 -12
- package/src/client/FileIcon.tsx +6 -0
- package/src/client/Icon.tsx +1 -14
- package/src/client/MonacoEditor.tsx +187 -19
- package/src/client/TerminalPanel.tsx +6 -3
- package/src/client/Workbench.tsx +324 -81
- package/src/client/WorkspaceSwitcher.tsx +53 -0
- package/src/client/api.ts +27 -1
- package/src/client/documentPreview.tsx +92 -5
- package/src/client/dshComposer.ts +73 -0
- package/src/client/dshNavigation.ts +81 -0
- package/src/client/fileIconMap.ts +7 -0
- package/src/client/gitError.ts +5 -0
- package/src/client/index.tsx +28 -14
- package/src/client/lsp.ts +300 -0
- package/src/client/searchHighlight.ts +6 -0
- package/src/client/styles.ts +28 -31
- package/src/client/typescriptProject.ts +81 -0
- package/src/context.ts +8 -0
- package/src/host.ts +100 -15
- package/src/index.ts +121 -17
- package/src/lsp.ts +170 -0
- package/src/office.ts +95 -0
- package/src/types.ts +2 -0
- package/src/watch-ignore.ts +22 -1
package/README.en.md
CHANGED
|
@@ -165,6 +165,10 @@ Version 0.1.14 fixes the overlapping header on Windows Desktop: DSH 0.2 reserves
|
|
|
165
165
|
|
|
166
166
|
Version 0.1.14 also targets large repositories and crowded tab strips. The file watcher skips large trees such as `vendor`, `third_party`/`third_part`, `build`, `dist`, `out`, `target`, `.venv`, and `__pycache__` by default, with extra exclusions configurable in workbench settings; running out of watches now disables auto-refresh instead of crashing DSH at the inotify limit. Tabs stay on one line with ellipsis and no native scrollbar, the close-all action stays pinned to the right, and the active tab scrolls into view. The bottom status bar is hidden by default and can be re-enabled in settings.
|
|
167
167
|
|
|
168
|
+
Version 0.2.0 adds language intelligence: install a language server per language from settings (TypeScript/JavaScript built in; Pyright, Intelephense, Shell, YAML/JSON/CSS/HTML and Docker LS install with one click; gopls, rust-analyzer, clangd, Eclipse JDT LS, csharp-ls and LuaLS need a manual install), with go to definition, find references, Peek, completion, signature help and diagnostics, plus an install prompt when a matching file opens. The editor previews PDF, Word (converted to PDF by LibreOffice), Excel (sheet tabs) and PowerPoint; the explorer supports dragging entries to move them, dragging files out to the desktop or another app, and dropping files on the editor to open them, while previewable Git changes open their preview directly; selected code or files can be added to the DSH conversation. The activity bar can be reordered by dragging and views hidden or restored from a right-click menu; a centered workspace switcher creates workspaces, enters existing ones and switches sessions inside one workspace without reloading the explorer. Watcher exclusions now come from `.gitignore`; a session that is not published yet no longer shows an error at startup; the light terminal uses VS Code's Light ANSI palette; Git changes use the explorer's colourful icons and the graph follows VS Code's rounded links and nodes.
|
|
169
|
+
|
|
170
|
+
Version 0.1.15 unifies the dark palette: the activity bar, sidebar, tab strip, bottom panel and status bar share `#191a1b`, the editor uses `#121314`, inputs and overlays use `#202122` / `#252526`, and text and accents move to one VS Code-style scale (`#bfbfbf` / `#8c8c8c` / `#6e6e6e`, `#307e9f`). Monaco and the terminal use the same surfaces, and the dark status bar no longer switches to a separate blue background. The light theme follows VS Code Light: the sidebar and terminal use `#f9fafb`, the editor uses `#fff`, separators use `#e5e5e5`, and the sidebar/editor and editor/terminal boundaries get dividers with 8px rounded corners. The Follow DSH mode now follows DSH's light/dark scheme but uses the same palettes as the explicit Dark and Light options, so Follow DSH in dark mode matches the Dark theme exactly. Settings gain an editor font size slider (11–20px) that only affects the Monaco editor for the open file, with a debounced commit so dragging no longer reflows the whole workbench. Activity bar icons use a consistent 18px size with a rounded selected background instead of a left accent bar; the activity bar itself gets a border and 8px top-left/bottom-left corners while staying flush to the window edge. Tabs follow VS Code's top-rounded active tab with an 8px radius, are slightly shorter at 33px, and close on middle-click; the explorer's right edge, the editor group, the terminal and the DSH conversation panel are rounded cards backed by a dedicated gutter color, with their bottom edges flush to the status bar. List rows return to full-width square selection, while inputs, menus and terminal entries use VS Code's corner radii; the terminal tab sidebar shares the terminal surface color, and the xterm canvas reads the panel background so it is panel-gray instead of pure white in the light theme. Sidebar headers, the tab strip, the editor toolbar and panel headers share a 35px height, file/search/Git/terminal rows use 22px, inputs follow VS Code heights, and scrollbars use VS Code-style rounded sliders; the tab-strip bottom line appears only outside the active tab, which stays connected to the editor; the close-all button is gone and tabs use a VS Code context menu (Close, Close Others, Close to the Right, Close Saved, Close All). The editor group, tab strip and terminal gain their missing top/bottom hairline borders, and the activity bar no longer shows a stray scrollbar. The explorer, editor group, terminal and DSH conversation panel share the same outer borders, with the explorer bordered on top and bottom and all cards flush to the top bar and status bar. The editor and terminal form one continuous middle card: their side borders join without a break and only the outer corners are rounded; the editor card regains its bottom corners when the terminal panel is closed. All cards sit flush against the top bar with no remaining top gap; the empty tab strip is hidden when no file is open so the empty editor matches the editor background, and the terminal is a separate rounded card with a 4px gap from the editor. Both panel dividers share a 4px indicator; dragging the explorer or DSH conversation panel below its minimum width hides it, and the matching activity-bar icon restores it. Clicking a search result opens the file, jumps to the matched line and highlights the match in the editor; Markdown files switch to the source view automatically. Source Control now has a branch picker: it lists local branches, marks the current one, and can create and switch to a new branch by name; branches checked out in another worktree are marked and disabled to avoid a failed `git switch`, and a failed switch (for example when local changes would be overwritten) opens a centered error dialog instead of inline red text in the sidebar. Monaco preloads its Chinese language pack, so its built-in menus are Chinese (`zh-cn`); opening a file no longer highlights the first line until the editor is clicked. In the dark theme, hiding the DSH conversation panel keeps the DSH title bar dark instead of turning it white, and the workbench status bar uses VS Code dark/light surfaces instead of a fixed blue. The terminal panel can be dragged down to hide, and dragging up from the editor's bottom edge pulls it back out. The explorer and tab bar use the `vscode-icons` colorful file/folder icon pack, served on demand by the new `/dsh-vscode/file-icons` route. The DSH conversation panel follows the same surfaces in the fixed dark theme. The workbench entry moves into the DSH sidebar panel list next to Plugins and Scheduled Tasks instead of using a floating button, and the DSH conversation panel toggles from the whale icon in the activity bar.
|
|
171
|
+
|
|
168
172
|
- Client contributions use `ui-renderer` slots and select the current session through `ui-session`'s `mainView` retain count, replacing the removed `dsh-client-runtime`.
|
|
169
173
|
- Files, search, Git and new terminals use `workingDirectory.get(session)`. Workspace selection follows the working-directory projection; missing sessions return 404.
|
|
170
174
|
- HTTP and WebSocket routes share Harness authentication and Host/Origin checks through `connection.requestRejection()`. Terminals also require loopback access.
|
package/README.md
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
## 安装
|
|
66
66
|
|
|
67
|
-
插件 0.
|
|
67
|
+
插件 0.2.0 适配 DeepSeek Harness `0.2.2-rc.1`(Cordis `4.1.0`)。请先更新 Harness,再安装插件;旧版对应关系见下表。
|
|
68
68
|
|
|
69
69
|
```bash
|
|
70
70
|
npm i -g @deepseek-ai/dsh@0.2.2-rc.1
|
|
@@ -138,6 +138,8 @@ dsh: nothing was installed.
|
|
|
138
138
|
|
|
139
139
|
| 插件版本 | 需要的 Harness |
|
|
140
140
|
| --- | --- |
|
|
141
|
+
| 0.2.0 | `0.2.2-rc.1`(Cordis `4.1.0`,默认基线);另验证 `0.2.1-rc.5`(Cordis `4.0.5`) |
|
|
142
|
+
| 0.1.15 | `0.2.2-rc.1`(Cordis `4.1.0`,默认基线);另验证 `0.2.1-rc.5`(Cordis `4.0.5`) |
|
|
141
143
|
| 0.1.14 | `0.2.2-rc.1`(Cordis `4.1.0`,默认基线);另验证 `0.2.1-rc.5`(Cordis `4.0.5`) |
|
|
142
144
|
| 0.1.12 | `0.2.1-rc.5`(Cordis `4.0.5`,默认基线);另验证 `0.2.2-rc.1`(Cordis `4.1.0`,Node.js ≥24.9) |
|
|
143
145
|
| 0.1.11 | `0.2.1-rc.5`(Cordis `4.0.5`,默认基线);另验证 `0.2.2-rc.1`(Cordis `4.1.0`,Node.js ≥24.9) |
|
|
@@ -145,7 +147,7 @@ dsh: nothing was installed.
|
|
|
145
147
|
| 0.1.9 | `0.2.1-alpha.3`(Cordis `4.0.5-alpha.2`,旧版验证基线) |
|
|
146
148
|
| 0.1.8 | `0.1.1-rc.2` |
|
|
147
149
|
|
|
148
|
-
Harness `0.2.0-rc.2` 上没有可用的插件版本:0.1.9 依赖 Harness `0.2.1-alpha.2` 才引入的 `workingDirectory` 服务,0.1.8 又只适配 `0.1.1-rc.2`。请先把 Harness 升级到 `0.2.2-rc.1` 再安装 0.
|
|
150
|
+
Harness `0.2.0-rc.2` 上没有可用的插件版本:0.1.9 依赖 Harness `0.2.1-alpha.2` 才引入的 `workingDirectory` 服务,0.1.8 又只适配 `0.1.1-rc.2`。请先把 Harness 升级到 `0.2.2-rc.1` 再安装 0.2.0,例如 npm 全局安装时:
|
|
149
151
|
|
|
150
152
|
```bash
|
|
151
153
|
npm i -g @deepseek-ai/dsh@0.2.2-rc.1
|
|
@@ -165,6 +167,10 @@ npm i -g @deepseek-ai/dsh@0.2.2-rc.1
|
|
|
165
167
|
|
|
166
168
|
0.1.14 同时处理大仓库与多标签场景:文件监听默认跳过 `vendor`、`third_party`/`third_part`、`build`、`dist`、`out`、`target`、`.venv`、`__pycache__` 等大目录,并允许在工作台设置里追加排除项;监听资源耗尽时只停用自动刷新,不再让 DSH 因 inotify 上限崩溃。标签栏改为单行省略并隐藏原生滚动条,关闭全部按钮固定右侧,切换标签时自动滚入可视区域。底部状态栏默认隐藏,可在设置中重新开启。
|
|
167
169
|
|
|
170
|
+
0.2.0 新增语言智能:可在设置里按语言安装语言服务器(TypeScript / JavaScript 内置,Python Pyright、PHP Intelephense、Shell、YAML / JSON / CSS / HTML、Dockerfile 可一键安装,Go gopls、Rust rust-analyzer、C / C++ clangd、Java Eclipse JDT LS、C# csharp-ls、LuaLS 需手动安装),提供转到定义、查找引用、Peek 多结果、智能补全、签名帮助与诊断;打开未安装语言的文件会提示安装。编辑器现在可直接预览 PDF、Word(LibreOffice 转 PDF)、Excel(工作表页签)和 PowerPoint;资源管理器支持拖动移动条目、拖到桌面或其他应用导出、拖到编辑器打开,Git 更改里的可预览文档会直接打开预览;选中代码或文件可一键添加到 DSH 对话。活动栏支持拖动排序和右键隐藏/恢复视图;新增居中的工作区切换窗口,可新建工作区、进入已有工作区并在同一工作区内切换会话,切换会话不再重载文件管理器。文件监听排除项改为自动读取 `.gitignore`;启动时会话尚未就绪不再显示错误;浅色终端改用 VS Code Light ANSI 色板;Git 更改列表使用资源管理器同款彩色图标,Git 图谱改为 VS Code 风格的圆角连线与节点。
|
|
171
|
+
|
|
172
|
+
0.1.15 统一深色主题配色:活动栏、侧栏、标签栏、底部面板和状态栏统一为 `#191a1b`,编辑器为 `#121314`,输入框与浮层为 `#202122` / `#252526`,文本和强调色同步到同一套 VS Code 风格色板(`#bfbfbf` / `#8c8c8c` / `#6e6e6e`、`#307e9f`);Monaco 与终端使用相同底色,深色状态栏不再单独使用蓝色背景。浅色主题同步 VS Code Light:侧栏和终端为 `#f9fafb`、编辑器为 `#fff`、分隔线为 `#e5e5e5`,并为侧栏与编辑器、编辑器与终端之间加入分隔线和 8px 圆角。「跟随 DSH」模式按 DSH 的明暗切换使用与「深色」「浅色」相同的色板,因此跟随 DSH 的深色外观与右侧「深色」完全一致。设置中新增「编辑器字体大小」(11–20px),只作用于右侧打开文件的 Monaco 编辑器,拖动时防抖提交,不再让整个工作台重新排版。活动栏图标统一为 18px,选中态改为 VS Code 的圆角背景并去掉左侧蓝条;左侧活动栏增加边框和左侧上下 8px 圆角,仍然贴满窗口左边;标签栏改为 VS Code 的顶部圆角活动标签并收紧到 33px,支持鼠标中键关闭;活动标签顶部圆角加大到 8px;标签栏底线只在非活动区域显示,活动标签直接与编辑器连通。资源管理器右侧、编辑器组、终端和 DSH 对话栏改为圆角卡片,间隙使用独立的 gutter 底色,卡片底部直接贴住状态栏。列表恢复整行方角,输入框、菜单和终端按 VS Code 的圆角尺寸调整;终端标签侧栏与终端主区统一使用相同底色,终端画布背景会读取面板的实际底色(浅色下为面板灰,而不是纯白)。侧栏头、标签栏、编辑工具栏和面板头统一为 35px,文件/搜索结果/Git/终端列表行统一为 22px,输入框高度对齐 VS Code,滚动条改为 VS Code 风格的圆角滑块;编辑器组、标签栏和终端补齐顶部/底部细线,活动栏隐藏多余滚动条。资源管理器、编辑器组、终端和 DSH 对话栏统一 4px 上下留白和外边框,资源管理器补齐上下边线;中间的编辑器与终端合并为一张连续卡片,左右边框不断开,只在最外层保留圆角;终端面板关闭时编辑器卡片会自动补全底部圆角。所有卡片顶部直接贴住标题栏,不再保留 4px 上缝隙;未打开文件时隐藏空标签栏,空编辑区与编辑器背景一致;终端作为独立圆角卡片,与编辑器之间保留 4px 空隙。左右分隔条统一为 4px 指示线;将资源管理器或 DSH 对话栏拖到最小宽度以下会自动隐藏,可通过活动栏对应图标恢复。搜索结果点击后会打开对应文件、跳到匹配行并在编辑器中高亮匹配词;Markdown 文件会自动切到源码视图。源代码管理的分支名改为下拉选择器:列出本地分支、标记当前分支,并可直接输入名称创建并切换新分支;已在其他 worktree 检出的分支会标记并禁用切换,避免 `git switch` 报错;切换失败(例如本地修改会被覆盖)会弹出居中的错误对话框,而不是在侧栏显示内联红字。右侧「全部关闭」按钮已移除,改为标签右键菜单(关闭、关闭其他、关闭右侧标签页、关闭已保存、全部关闭);Monaco 编辑器显式预加载中文语言包,右键菜单等内置文案使用中文(`zh-cn`);打开文件时不再默认高亮第一行,只有点击编辑器后才显示当前行高亮。深色主题下隐藏 DSH 对话栏时,工作台会继续保持 DSH 标题栏的深色,不再出现顶部变白;工作台底部状态栏改为 VS Code 风格的深/浅色底,不再固定为蓝色。终端面板可向下拖动隐藏;隐藏后从编辑器底部边缘向上拖动可重新拉出终端。资源管理器和标签栏改用 `vscode-icons` 彩色文件/文件夹图标包,图标由新增的 `/dsh-vscode/file-icons` 路由按需提供。DSH 对话栏在固定深色模式下也使用同一套底色。工作台入口移入 DSH 侧栏的面板列表(与「插件」「自动化任务」等并列),不再使用右下角悬浮按钮;DSH 对话栏的开关移到活动栏的鲸鱼图标,可随时打开或关闭。
|
|
173
|
+
|
|
168
174
|
- 客户端通过 `ui-renderer` 提供的槽位服务注册界面,使用 `ui-session` 的 `mainView` 引用选择当前会话;不再依赖已移除的 `dsh-client-runtime`。
|
|
169
175
|
- 文件、搜索、Git 和新建终端通过 `workingDirectory.get(session)` 使用会话当前目录,跟随工作目录投影切换;失效会话返回 404。
|
|
170
176
|
- HTTP 与 WebSocket 接口使用 `connection.requestRejection()`,共享 Harness 登录认证及 Host/Origin 校验;终端额外保留 loopback 限制。
|