Install
Inside DeepSeek Harness, with dsh-market
dsh plugin --profile web add dshmarket
Or from the command line
dsh plugin --profile web add dsh-plugin-open-with
Installing runs third-party code with your own permissions — it can read your files, use your credentials and reach the network. Review the source first, and pin a commit (github:owner/repo#sha) when you can.
README
This plugin publishes its README in Chinese only.
🖼 效果图

🧩 功能
- 💊 胶囊拆分按钮:左半边执行当前选择的启动器;右半边下拉菜单列出全部启动器,点击即切换并立即启动。
- 🛠 四个内置启动器:
- VS Code:解析 PATH 上的 VS Code CLI,通过
cmd /c启动。 - CMD / PowerShell:开独立控制台窗口并定位到工作区。
- 文件资源管理器:调用
explorer.exe打开工作区。
- VS Code:解析 PATH 上的 VS Code CLI,通过
- ⚙️ 设置页面:在 DSH 设置面板中注入「Open With」配置区域,支持:
- 当前项选择:点击卡片切换当前启动器,胶囊按钮同步更新。
- 拖拽排序 🆕:预设项和自定义项各自组内拖拽重排,插入线指示落点。胶囊菜单排序与设置页所见即所得。
- 可见性控制 🆕:每项支持独立隐藏/显示,胶囊菜单仅展示可见项。
- 自定义项管理 🆕:添加/编辑自定义启动器,填写名称和路径;保存后立即关闭表单,图标后台自动提取;路径自动清除首尾引号兼容粘贴。
- 持久化存储:设置自动保存到 host 端文件系统,重启后保持。
- 🌍 中英双语 UI:跟随 DSH 客户端全局 locale 自动切换。
💻 支持系统
| 系统 | 状态 |
|---|---|
| 🪟Windows 10 / 11 | ✅ 完全支持 |
| 🍎 macOS | ❌ 暂不支持 |
| 🐧 Linux | ❌ 暂不支持 |
⚠️ 当前版本仅支持 Windows 平台。我们非常欢迎社区贡献 macOS 和 Linux 的适配!
🚀 安装
方式一:从 npm 安装(推荐)
已发布到 npm:dsh-plugin-open-with(当前最新 1.0.0)。在终端执行:
# 安装
dsh --profile web plugin add dsh-plugin-open-with
# 验证安装版本
dsh --profile web plugin list
# 卸载
dsh --profile web plugin remove dsh-plugin-open-with
方式二:从仓库安装(开发 / 调试)
git clone https://github.com/hyrinx/dsh-plugin-open-with.git
cd dsh-plugin-open-with
npm install
npm run build
dsh --profile web plugin add "link:$($PWD.Path)"
重启 dsh web 生效。后续修改源码只需重新 npm run build + 刷新浏览器。
🔒 安全模型
本插件会在 DSH 宿主端启动外部程序,安全措施如下:
- Loopback 通道:
/open-withRPC 以authority: 'loopback'注册,仅本机回环访问可用。 - 封闭枚举 target:启动目标为 TypeScript closed union,非法值无法进入可执行文件名。
- 工作区路径来自会话 snapshot:不接受 URL 参数或外部输入。
🚧 已知限制
- 仅支持 Windows:macOS / Linux 适配需要社区贡献。
- 必须通过本机浏览器回环访问(
localhost/127.0.0.1)。 - VS Code 需要先把
code命令加入 PATH:VS Code 命令面板 →Shell Command: Install 'code' command in PATH。 - 终端使用系统自带 cmd.exe / powershell.exe:自定义启动器支持任意 .exe 路径。
- 图标提取仅支持 .exe 文件:后台异步执行,保存后可能短暂显示默认图标。
🏗 构建与扩展
npm install
npm run build # tsdown 产出 lib/ 主/客两端 bundle + lib/types/*.d.ts
npm run typecheck # tsc -p tsconfig.json --noEmit
npm pack # 发布前预览 tarball 内容
npm publish --access public
如何新增一个启动器:
通过设置页 UI 添加自定义项即可(推荐,无需改代码):在 DSH 设置面板 → Open With → Custom 区域点击「+ Add」,填写应用名称和 .exe 路径。图标自动提取,支持拖拽排序和可见性控制。
🤝 贡献
欢迎以下方向的 PR:
- 🍎🐧 macOS / Linux 平台适配:实现各平台的 shell、文件管理器启动和
- 🖥 更多 IDE 启动器:JetBrains 全家桶、Sublime Text、Neovide、Cursor、Windsurf……
- 💻 更多终端候选:Windows Terminal (
wt)、PowerShell 7 (pwsh)、Git Bash、Alacritty、WezTerm…… - ⚙️ 设置页增强:导入/导出配置、批量操作
- 🎨 UI 反馈:把
launching/opened/failed状态接入 React render
提 PR 前请确保:
npm run typecheck # 通过
npm run build # 通过
npm pack # 无 WARN / error