Back to home@CnsMaple

dsh-open-in-editor

No description

Stars
0
Language
JavaScript
Created
Aug 19, 2026
Updated
Aug 19, 2026
GitHub repo

Introduction

dsh-open-in-editor

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

Adds a session-header 打开 / Open button 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

  • 🗔 打开 button in every session header — resolves the session's 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.)

Alternative — clone or symlink into the profile's node_modules (a DSH plugin is installed per-profile):

git clone https://github.com/CnsMaple/dsh-open-in-editor.git \
  "<profile>/node_modules/dsh-open-in-editor"

Then enable the plugin in the profile configuration (e.g. cordis.patch.yml):

# cordis.patch.yml
plugins:
  dsh-open-in-editor: {}

Restart the harness. You should see 设置 → 插件 list the plugin and the 打开 button in session headers.

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 any session, click 打开 to open that session's workspace directory in the chosen editor.

Behavior notes

  • The button tooltip and the actual launch always follow 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