dsh-open-in-editor
其他 活跃维护

dsh-open-in-editor

CnsMaple/dsh-open-in-editor

新增Web端工作区快捷打开入口,点击即可直接唤起本地编辑器打开当前会话对应的工作目录,无需手动查找路径,操作简单流畅。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
22 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:CnsMaple/dsh-open-in-editor
git clone https://github.com/CnsMaple/dsh-open-in-editor.git
git clone git@github.com:CnsMaple/dsh-open-in-editor.git
README.md main

dsh-open-in-editor

Open the current session's workspace directory in a local editor directly from the DeepSeek Harness Web GUI.

Adds an 打开工作区 / Open workspace item in every sidebar workspace row's menu (beside Rename / Delete workspace) that launches your local editor (VS Code, VS Code Insiders, Cursor, Zed, Windows Explorer, …) on the host machine, plus a 设置 → 插件 → 插件配置 card to pick which editor to use.

Features

  • 🗔 打开工作区 item in every workspace row's menu — resolves the workspace directory and opens it in your editor
  • ⚙️ Editor picker in the Web GUI settings (Plugins → Plugin configuration):
    • auto — probes code, code-insiders, cursor, codium, subl, zed in order
    • any command name (code, cursor, zed, …)
    • any absolute path to an editor executable
    • explorer — open the folder in Windows File Explorer
    • environment-variable references (%MY_EDITOR% / $MY_EDITOR) are expanded
  • 🛟 Fallback env override — when the config is auto, the DSH_OPEN_IN_EDITOR environment variable is consulted first
  • 🖥️ Reliable window launch on Windows — GUI windows are launched through an interactive Task Scheduler task, so the editor/Explorer window actually appears on the logged-on user's desktop even when the harness runs with a non-interactive logon token (the usual cause of "it succeeded but no window appeared")

Installation

Recommended — install directly with the DSH CLI:

dsh plugin --profile web add https://github.com/CnsMaple/dsh-open-in-editor.git

(Use --profile <name> for the profile you actually use, e.g. --profile web.)

The package ships as a bundle (dsh.bundle.patch): install reconciles it into the profile's dsh.profile.bundles and its own cordis.patch.yml mounts the plugin, so no manual cordis.patch.yml edit is needed.

Upgrading from a manually-inserted install: remove the old
- insert: { id: open-in-editor, name: 'dsh-open-in-editor' } block from
cordis.patch.yml to avoid mounting the plugin twice.

Restart the harness. You should see 设置 → 插件 list the plugin and the 打开工作区 item in sidebar workspace row menus.

Usage

  1. Put the editor command in 设置 → 插件 → 插件配置 → 编辑器命令:
    • auto — auto-detect (default)
    • code / code-insiders / cursor / zed / codium / subl
    • explorer — File Explorer window
    • an absolute path, e.g. D:\Program Files\Zed\Zed.exe
    • an environment reference, e.g. %MY_EDITOR%
  2. In the sidebar, open any workspace row's menu and click 打开工作区 to open that workspace's directory in the chosen editor.

Behavior notes

  • The menu item's launch always follows the saved configuration (the Web GUI resolves it live; no host restart needed after changing the setting, only a page refresh at most).
  • On Windows the launch is performed via a one-shot interactive scheduled task (schtasks /it) to guarantee the window appears on the interactive desktop. Task Scheduler must be enabled (it is by default).

License

MIT