dsh-workspace-context-helper
Manifest validBrowse workspace files in a right sidebar tab and add files or selected code lines to the session from context menus, with a line-selectable code preview.
dsh-workspace-context-helper
English | 简体中文
DeepSeek Harness(DSH)客户端插件:为对话工作区补齐「浏览文件树 → 引用文件 → 引用代码行」链路。
纯客户端行为:不开 Host 服务、不注册工具、不访问网络;全部能力都是浏览器内 UI 交互(开页面、写剪贴板、插入草稿)。
功能
- 浏览工作区文件 — 工作区头部
...菜单新增「浏览工作区文件」,打开内置文件树页(含 Host 模糊搜索:纯词按文件名、带/按相对路径匹配,忽略大小写)。 - 文件右键菜单 — 内置文件页的文件行右键新增:
- 复制文件相对路径 / 复制文件绝对路径;
- 把文件添加到上下文 — 向输入框插入
@路径引用芯片(与@选择器同通道)。
- 可选行代码预览 — 代码类文件(java/py/vue/js/ts/xml/yml/json/sql…)的右侧预览由本插件接管:
- 在左侧行号栏按住拖拽即可多选连续行,弹出操作框支持 添加到上下文(引用芯片 + 带行号的引用块)与 复制所选行,
Esc取消; - 预览头部下拉可随时切回内置高亮渲染器。
- 在左侧行号栏按住拖拽即可多选连续行,弹出操作框支持 添加到上下文(引用芯片 + 带行号的引用块)与 复制所选行,
- 全屏修复 — 右栏全屏时代码页保持可读:全屏面板层级兜底(z-index 40)、全屏代码区绘制实底背景;停靠态保留原玻璃外观。
安装
方式一(npm 包,推荐):plugin_manager 的 install_bundle,目标为 npm 包名 dsh-workspace-context-helper。国内镜像同步官方源通常有延迟,若提示找不到包,安装时指定官方源 --registry=https://registry.npmjs.org。
方式二(本地目录):DSH 网页 插件 → 添加插件,指向本目录(绝对路径);或 install_bundle 目标为本目录绝对路径。
方式三(从 GitHub):克隆或下载本仓库后,对仓库目录执行上述任一方式即可。
无需构建步骤:插件是纯 ESM 包,install_bundle 会完成依赖链接。
兼容性
针对 DSH 0.2.2-rc.3 客户端 API 开发并测试。自 0.1.2 起「添加到上下文」对 SessionInput 的能力做了多形态探测(addFiles / insertReference / addReferences / canInsertReferences),对客户端 API 的小版本差异有一定容忍度。
已知限制
- 插件渲染器刻意不做语法高亮;需要高亮阅读时用预览头部下拉切回内置渲染器,插件停用时内置渲染器自动恢复。
- 行选择基于指针(鼠标/触控板/触摸),未实现键盘范围选择。
- 「添加到上下文」为尽力而为:输入框不可编辑(消息发送中、子代理会话)时菜单禁用,弹窗显示失败提示;插入被占用时会排队自动补插(最长 120 秒)。
文档
- 功能细节与设计说明:docs/DETAIL.md
- 更新日志:CHANGELOG.md
许可证
Comments
Loading…
Similar plugins
by TLEWA
Right-click menus for DSH sidebar workspace and session rows: open folders in VS Code or Explorer, copy paths and session links.
★ 1
MIT
JavaScript
Nov 8, 2026
dsh plugin --profile web add dsh-sidebar-row-menuAdds Open workspace entries to the sidebar session-row menu and the session header actions slot, opening the session workspace folder in the system file manager.
★ 0
dsh plugin --profile web add dsh-open-workspaceby gaor0605-kq
在 DSH 左侧栏查看工作区文件,拖进对话让 DSH 读取或修改 · DSH plugin: browse workspace files in the left sidebar and drag them into the chat
★ 0
MIT
JavaScript
Nov 6, 2026
dsh plugin --profile web add dsh-workspace-explorerby Irrow627
DSH-plugin: open the session's workspace folder, a terminal, or VS Code straight from the conversation header — plus a settings dialog for their order and visibility.
★ 0
JavaScript
Nov 17, 2026
dsh plugin --profile web add dsh-quick-actionsby tangu2023
Adds a custom right-click context menu to the sidebar workspace files tree, with new folder, rename, reveal in file manager, open in browser, open in VS Code, copy path, streaming ZIP download, and de
★ 1
MIT
JavaScript
Oct 8, 2026
dsh plugin --profile web add dsh-menuby miao-ge
DSH plugin: right-click menu on the left sidebar workspace rows - rename, delete workspace, open in VS Code, reveal in File Explorer, plus open in a new tab when dsh-project-tabs is installed.
★ 0
MIT
JavaScript
Oct 5, 2026
dsh plugin --profile web add dsh-sidebar-context-menu