dshbase

Plugin directory / Developer / dsh-open-in-code

dsh-open-in-code

Verified · install-tested on dsh abbno

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

0Stars
0Forks
0Open issues
—Language
2026-08-22Last push
Cross-platformPlatform

What it does

A plugin in the Developer category for DeepSeek Harness.

✅
Our take
Works — verified, early-stage project

A plugin in the Developer category for DeepSeek Harness. It installs cleanly and boots without issues in our testing. It's early-stage but functional.

“Verified” means our automated CI actually ran dsh plugin add in a clean profile and it booted — nothing more. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

README

dsh-open-in-code

DeepSeek Harness 插件:在 Web GUI 会话头部一键用 Visual Studio Code 打开当前会话所属的工作区目录。

功能

  • 在会话头部右侧工具区显示 "在 VSCode 打开" 按钮(位于 "Session log" 下载按钮左侧)。
  • 点击后自动解析当前会话的工作区目录,并在 VS Code 中打开。
  • 已运行 VS Code 时:转发到现有实例并立即返回;未运行时:启动新窗口。

安装(分发给其他人)

方式一:通过 Git 仓库(推荐)

接收方执行:

dsh plugin --profile web add git+https://github.com/abbno/dsh-open-in-code.git

安装后 dsh 会自动把包加入 profile 的 dsh.profile.bundles 层列表并生效,重启 dsh web 即可看到按钮。

若 pnpm 要求先放行构建脚本,按其提示在
$DSH_HOME/profiles/web/pnpm-workspace.yaml 的 allowBuilds 中添加该包即可
(本插件纯 JS、无构建步骤,通常无需此操作)。

方式二:本地目录 / tarball

# 本地目录
dsh plugin --profile web add file:D:/path/to/dsh-open-in-code
# 或打完的 tarball
dsh plugin --profile web add ./dsh-open-in-code-0.1.0.tgz

手动编辑 profile(等价方式)

把以下内容加入 $DSH_HOME/profiles/web/package.json 的 dependencies 与
dsh.profile.bundles(或直接 pnpm add 后重新运行 dsh,让其自动 reconcile):

{
  "dependencies": {
    "dsh-open-in-code": "git+https://github.com/abbno/dsh-open-in-code.git"
  },
  "dsh": {
    "profile": {
      "bundles": [/* ... */, "dsh-open-in-code"]
    }
  }
}

工作原理

  • cordis.patch.yml:profile bundle patch,insert 一行挂载本插件的 Loader 条目。
  • lib/index.js(Host):Cordis 插件 apply(ctx),注册 DSH 内置命令 open-in-vscode——
    1. 从 invocation.agent.session.header.cwd 读取会话的工作区目录(回退:注册表中按 session 归属找工作区路径);
    2. 定位 VS Code Code.exe(%LOCALAPPDATA%\Programs\Microsoft VS Code → Program Files → PATH 上的 code shim 回溯);
    3. subprocess.spawn(['Code.exe', cwd]) 打开目录,不等待退出即返回成功。
  • lib/client.js(Client):window.__ModuleLoader__.load(...) 注册到
    conversation.session.header.utilities 插槽(id: open-in-vscode,order: -10,排在 Session log 前),
    按钮点击后经 DSH 预置的 ctx.remote.commands.execute(sessionId, '/open-in-vscode')
    调用 Host 命令(无需自定义 RPC / typert)。

开发

dsh-open-in-code/
├── package.json       # dsh.bundle.patch + dsh.client(platform: web)
├── cordis.patch.yml   # 挂载行
├── lib/
│   ├── index.js       # Host 插件(纯 JS,无构建)
│   └── client.js      # Client 插件(__ModuleLoader__ 格式)
├── README.md
└── LICENSE (Apache-2.0)

纯 JavaScript、零构建、零运行时依赖(仅依赖 DSH 内置服务 commands / agents / subprocess / slots / remote)。

License

Apache License 2.0

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-open-in-code for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:abbno/dsh-open-in-code

Headless (CLI) profile:

dsh plugin --profile headless add github:abbno/dsh-open-in-code

Test report

Verified: L1 install + L2 load + L3 runtime from GitHub source on dsh 0.1.0-rc.6.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7819 plugins →