dsh-open-folder-visible: Fix invisible "Open workspace in Explorer" window on Windows

Preface

In DeepSeek Harness (DSH), the “Open In…” split button in the Session header opens the current session’s workspace directory in the local file manager by default, using the shortcut Ctrl+Alt+O (corresponding to workspace.openLocal). On Windows, clicking it reports success on the Host side, but the Explorer window often does not appear, making it look like the button is unresponsive.

The root cause lies in the upstream explorer shell-open implementation within @deepseek-ai/dsh-host-open-in-app: when launching explorer.exe via @deepseek-ai/dsh-native-command, it uses windowsHide: true. This option is intended to prevent the CLI subprocess from briefly flashing a console window, but when applied to Explorer, it renders the new window invisible in the sense of IsWindowVisible(). Since the upstream code judges success solely based on the exit code, Explorer’s exit 1 is still treated as a successful delegation handoff. Consequently, the interface displays { ok: true } while no visible window appears.

The community plugin dsh-open-folder-visible (maintained by King20260919) corrects the launch parameters solely for the “open workspace directory” path, without replacing the header button or changing the shortcut key. The following sections cover its positioning, implementation highlights, installation, and limitations.

What is this

dsh-open-folder-visible is a DSH plugin for the web profile that specifically solves the issue of invisible windows on Windows when using the Session header’s “Open workspace in file manager” function. It does not refactor the split button itself, nor does it cover other paths such as “Reveal in File Explorer” (explorer.exe /select,<file>).

The plugin is open-sourced on GitHub (King20260919/dsh-open-folder-visible) under the MIT license; the community directory page is available at SkillHub (an independent community site with no official affiliation with DeepSeek / High-Flyer).

Problem and Upstream Behavior (Brief)

The header’s default action uses the explorer entry from the catalog in @deepseek-ai/dsh-host-open-in-app. On Windows, this is equivalent to:

execFile('explorer.exe', ['<file:// URI>'], { encoding: 'utf8', signal, windowsHide: true })

The README compares this on the same Host with the same call format: when windowsHide: true, the new window’s IsWindowVisible() returns false; changing it to windowsHide: false returns true. This is the direct basis for this plugin’s fix.

Core Functions

The plugin collaborates between the Host and browser sides, deliberately minimizing the scope of impact.

Host: Visible Window Launch Route

The Host side adds a new route POST /open-folder-visible/open. It launches explorer.exe using the same argv array as upstream (not a shell string), but sets windowsHide to false. Other semantics align with the official opener: it accepts Explorer’s exit 1 as a delegation handoff and uses a watch window to determine if the “launcher is still running” as a sign of a successful launch rather than an error.

Browser: Redirecting Only File Manager Open Requests

The client wraps globalThis.fetch to only redirect the specific launch request for “Open File Manager / Workspace Directory” to the above route. Other applications and requests on the page are passed through transparently.

What is Deliberately Not Done

  • Does not replace the Session header split button, application menus, icons, gesture feedback, or the Ctrl+Alt+O shortcut.
  • Does not modify the “Reveal in File Explorer,” revealNativePath, or other code paths (delivery file cards and “Show file location” in changed file reviews may still be affected by upstream windowsHide; this plugin does not cover these).

Installation and Activation

Installation command (from the README original):

dsh plugin --profile web add github:King20260919/dsh-open-folder-visible

Notes:

  1. Installing any plugin executes third-party code with the same permissions as you; to pin a version, you can append a commit reference: github:King20260919/dsh-open-folder-visible#<sha>.
  2. Restart DSH is required after installation: the Host side registers the /open-folder-visible/open route during loading.

Configuration

Field Default Value Meaning
launchWatchMs 1500 Early failure observation window for the explorer.exe handoff (in milliseconds). Success is decoupled from whether the process exits immediately, because Explorer exits quickly after handing the window over to the existing shell.

Typical Usage

No additional API calls are needed: after installation and restart, simply continue using the Session header “Open In…” default action or press Ctrl+Alt+O. The behavior is consistent with the official one, except that a visible Explorer window should appear on Windows.

Non-Windows platforms: The route returns 501, and other behaviors remain unchanged; it can be installed as usual but will have no fix effect.

Scenarios and Notes

Who is it for

  • Developers using the DSH web profile on Windows who frequently open local workspace directories via the header or Ctrl+Alt+O.

Must Know

  • Windows Only; the route is 501 on Linux / macOS.
  • Only fixes “Open Workspace Directory”, does not fix the /select Reveal path.
  • The redirect depends on matching the official launch route and request body; if DSH changes the route or body shape in the future, the redirect may no longer match and will silently fall back to the official behavior. The wrapper will not corrupt the original request.
  • The plugin runs with the current dsh process permissions; please review the source code and MIT license yourself before installation.

Conclusion

If you encounter “workspace open success prompt but no Explorer window” on Windows, dsh-open-folder-visible uses a minimal patch (one Host route + targeted browser-side fetch redirect) to align with upstream semantics and correct windowsHide, while preserving the official button and shortcut. For more information, see the community directory dsh-open-folder-visible and the GitHub repository King20260919/dsh-open-folder-visible.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye