dshplugin.devDeepSeek Harness Plugins
DSH For Wsl plugin logo
DeepSeek Harness Plugin

DSH For Wsl

0
Published by Rycar1

WSL workspace integration and shell routing plugin for DeepSeek Harness

Developer Toolsdeepseekdeepseek-harnessdshdsh-plugin

Get this plugin

Review the source, then continue to the publisher.

Get this plugin
Share on X ↗

About this plugin

Source snapshot 8/16/2026

DSH for WSL

DeepSeek Harness 提供 WSL 工作区集成的插件。它增加了 WSL 工作区选择、原生工作区注册、WSL 命令工具,以及 WSL 工作区下的命令路由。

功能

  • 检测电脑中已安装的 WSL 发行版和 WSL 版本。
  • 在“选择工作区”菜单中同时提供本机和 WSL 工作区。
  • 本机工作区继续使用 DSH 原生文件夹选择器。
  • WSL 工作区加入 DSH 原生工作区列表。
  • 侧栏使用 本机 · projectWSL · Ubuntu · project 清晰区分工作区。
  • WSL 工作区中的 Bash/Pwsh 命令自动转发给对应的 wsl.exe 发行版。
  • 提供列出发行版、创建工作区和执行命令的模型工具。

环境要求

  • Windows 10/11,并已启用 WSL。
  • DeepSeek Harness rc.6 或更高版本。
  • 至少安装一个 WSL 发行版。

检查 WSL 状态:

wsl.exe --list --verbose

安装

dsh plugin 不是独立的 install 命令,而是把后续参数转交给 profile 目录中的 pnpm。正确格式是:

dsh plugin --profile <profile> add <package>

从 GitHub 安装到指定 profile:

dsh plugin --profile web add git+ssh://git@github.com/Rycar1/dsh-for-wsl.git

也可以使用 HTTPS:

dsh plugin --profile web add https://github.com/Rycar1/dsh-for-wsl.git

从本地源码安装(使用绝对路径):

dsh plugin --profile web add "C:\path\to\dsh-wsl-idea"

安装后重启对应的 DSH profile。不要使用 dsh plugin install .\dsh-wsl-idea:DSH CLI 没有这个子命令,而且相对路径会基于 profile 目录解析。

使用

  1. 启动 DSH 并打开会话。
  2. 点击“选择工作区”。
  3. 选择“本机工作区 · 选择文件夹”,或选择检测到的 WSL 发行版。
  4. 输入 Linux 路径,例如 /home/user/project/mnt/c/Users/name/project
  5. 点击“连接 WSL 工作区”。
  6. 从侧栏在本机和 WSL 工作区之间切换。

插件提供以下模型工具:

  • wsl_list_distros:列出已安装的 WSL 发行版。
  • wsl_workspace:创建 WSL 目录,并可自动初始化 Git。
  • wsl_run:在指定 WSL 工作区中执行命令。

当活动工作区路径为 \\wsl.localhost\\<发行版>\\... 时,Shell 命令会自动转发到对应的 WSL 发行版。

推荐路径

为了兼容 DSH 的 Windows 文件面板,建议将项目放在 Windows 磁盘挂载目录:

/mnt/c/Users/<name>/workspace/project

纯 Linux 路径(例如 /home/user/project)可以通过 WSL 工具运行,但 Windows 文件 API 可能无法读取其安全元数据,文件面板可能出现 GetNamedSecurityInfoW failed

隔离测试环境

如果不想影响已有 DSH 配置,可以使用独立的 DSH_HOME 和 profile:

$env:DSH_HOME = "$env:USERPROFILE\.dsh-wsl-idea-test"
dsh --profile wsl-idea-test --port 43119

这样插件状态、工作区记录和会话都会与 desktopweb profile 分开。

故障排查

没有显示 WSL 发行版

运行 wsl.exe --list --verbose,确认 WSL 正常安装,然后重启 DSH。插件通过本机 WSL 可执行文件读取发行版列表。

命令仍然在 Windows 中执行

确认当前工作区名称以 WSL · 开头,并且路径使用 \\wsl.localhost。本机工作区继续使用 Windows Shell 是正常行为。

WSL home 目录无法浏览

将项目放到 /mnt/<盘符>/... 路径以使用原生文件面板;纯 Linux /home 路径请使用 wsl_run 执行文件操作和构建命令。

许可证

MIT