Preface¶
In the DSH Web GUI Session header, the “open work directory in app” split button hands the current work directory to local apps. On Windows, this capability goes through the shell-open channel, executed by @deepseek-ai/dsh-native-command. If you’ve experienced: button returns to idle, no UI error, but the Explorer window never pops up—this aligns with known upstream limitations on certain hosts. The following describes how the community plugin dsh-open-folder-fix fixes only the Explorer directory-opening behavior without breaking VS Code, Windows Terminal, and other “open in app” options.
What Is This¶
dsh-open-folder-fix is maintained by Martlet-Tech, with the repository at github.com/Martlet-Tech/dsh-open-folder-fix. The plugin uses Cordis bundle patch and browser injection to change the Explorer call on Windows from upstream’s explorer.exe "<file:// URI>" to explorer.exe /e,<directory>, solving the “reports success but no window opens” problem.
Community directory page: skillhub.cn/plugins/Martlet-Tech/dsh-open-folder-fix. SkillHub is a DSH community plugin directory with no official affiliation with DeepSeek / High-Flyer; installation methods should follow the directory page and the DSH current version’s plugin management documentation. The fetched materials do not provide a fixed CLI install command; please do not concatenate dsh plugin add forms that do not appear in the documentation.
Problem Background¶
Upstream in versions like 0.1.7-rc.1 uses the following call on Windows:
explorer.exe "<file:// URI of directory>"
Earlier versions went through PowerShell Invoke-Item. Both share the same symptom on some Windows hosts: dsh-native-command’s Known Limitations points out that in non-interactive sessions and similar environments, explorer.exe may not invoke file associations, returning exit code 1 after about 1 second; upstream treats exit code 1 as “handed off to desktop process,” combined with the launchWatchMs watchdog, making “window didn’t open” and “successfully opened” indistinguishable on the DSH side.
The README shows a comparison example on Windows 10 19045.7663: openNativePath reports success but the Explorer window count does not change; while explorer.exe /e,D:\Projects\dshell stably opens a new window.
Core Functions¶
Host Side¶
- Registers an independent route
POST /open-folder-fix/open, with the path deliberately not overlapping with upstream/open-in-app/*, to avoid plugin load failures caused by duplicatewebServer.registerregistration. - Non-Windows (non-
win32) requests return 501; macOS / Linux still use upstream behavior. - Configurable item
launchWatchMs(default 1500): the time window for observing early spawn failures afterexplorer.exehandoff; success is not bound to the process exit code (Explorer often returns exit code 1 after delegation, consistent with upstreamrunExplorerhandling).
Browser Side¶
- Reads the installed app list from upstream public
/open-in-app/apps; only forwards theexplorerid to this plugin’s route, while other apps (VS Code, Windows Terminal, Git Bash, etc.) still POST to upstream/open-in-app/open. - Disables the upstream
ui-open-in-appbrowser half viacordis.patch.yml, avoiding registration order uncertainty caused by competing with the plugin for the same slot cell id (open-in-app). - Upstream
@deepseek-ai/dsh-host-open-in-appremains mounted, continuing to provide the app directory and icons; the Explorer icon still goes through/open-in-app/icon/explorer.
Package Structure (to understand behavior)¶
package.json bundle manifest: declares dsh.bundle.patch and dsh.client
cordis.patch.yml disables upstream ui-open-in-app, inserts this plugin's Host line
index.js Host: registers POST /open-folder-fix/open
client.js Browser: takes over Session header split button
The plugin only uses Node built-in modules, and does not import @deepseek-ai/dsh-native-command’s revealNativePath (/select, is used for locating files and is unrelated to this plugin’s opening of the work directory).
Configuration¶
The Host-exported Config must conform to Standard Schema (including ~standard.validate). Cordis’s resolveConfig unconditionally calls Config['~standard'].validate(config) when it finds that the plugin exports Config; if it is written as a plain field description object, it will cause the DSH composition tree to throw errors at the startup stage, preventing the entire DSH from starting. The correct implementation can be found in the Config in index.js of the repository.
| Config Item | Description |
|---|---|
launchWatchMs |
Default 1500, range validation see Config.validate; only used for observing early failures such as spawn errors |
Installation and Enablement¶
- Check on the SkillHub directory page whether it can currently be installed and its version (the package version in the materials is 1.0.0).
- According to your DSH version, install the bundle through the profile’s bundle / plugin management flow (specific commands follow the directory page and official documentation; the materials do not provide a referenceable fixed CLI string).
- After enabling, refresh the Web GUI; if the package in the profile is a symbolic link pointing to a local development directory, changing the code and refreshing the page takes effect, without needing to repeat
install_bundle.
Repeated installation note: Calling install_bundle again on the same path may trigger upstream plugin-manager’s ambiguous-install (dependency change detection logic). During development debugging, prefer relying on symbolic links and refreshes rather than repeated reinstallation.
Typical Usage¶
After installing and enabling the bundle, no additional CLI is needed:
- Open a Session in DSH, confirm the workspace directory is valid on Windows.
- Click the “open work directory in app” split button in the Session header, select Explorer (or the item in the list corresponding to the
explorerid). - Expected behavior: Explorer opens a new window and enters that work directory. Other app entries still use upstream logic, with behavior consistent with when this plugin is not installed.
The actual Explorer form executed on the Host side is:
explorer.exe /e,<directory>
The README also records behavior differences of explorer.exe <directory>, explorer.exe /select,<parent directory> and other variants; this plugin chooses /e,<directory> as the stable new-window solution.
Applicable Scenarios and Notes¶
Who it’s for: Technical users and agent developers using DSH Web GUI on Windows, where “open work directory” frequently results in no window and no error.
Boundaries:
- Only meaningful on Windows; other platforms please rely on upstream.
- Does not modify the path of “show a file in Explorer” in upstream native-command.
- Plugin Host code runs under DSH process permissions; before installing, read the repository source code and license (package.json is
@local/dsh-open-folder-fix,private: true, subject to the GitHub repository).
The DSH ecosystem emphasizes “everything is a plugin”; this plugin is a community-maintained patch-type bundle, not part of the DSH core distribution.
Conclusion¶
dsh-open-folder-fix uses minimal invasion to fix the parameters of Explorer opening the work directory on Windows, and preserves the upstream app list and other apps’ launch paths. If you are troubled by “button succeeded but folder didn’t appear,” you can enter the repository from the directory page to read the test tables and patch design, then decide whether to add it to your profile.
- Directory page: https://www.skillhub.cn/plugins/Martlet-Tech/dsh-open-folder-fix
- GitHub: https://github.com/Martlet-Tech/dsh-open-folder-fix