dsh-plugin-desktop-shortcut

by DXF1024

0 开发与运行时github未核验到 manifest收录于 08-16

DeepSeek Harness插件,一键双击启动dsh web,无需终端。

A DeepSeek Harness (dsh) plugin that creates a Windows desktop shortcut to launch dsh web with a single double-click — no terminal needed.

安装

dsh plugin --profile web add github:DXF1024/dsh-plugin-desktop-shortcut

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

version license platform stars issues language powered_by_dsh

English | 中文

一个 DeepSeek Harness(dsh)插件:在 Windows 桌面创建一个一键启动 dsh web 的快捷方式,双击即用,再也不用手敲命令。

✨ 零运行时依赖(只用 Node 内置模块),仅支持 Windows。 🐳 内置可爱的 DeepSeek 鲸鱼娘图标(CC BY-NC-SA 4.0,见 assets/NOTICE.md)。

功能

  1. 插件加载时自动生成启动器脚本(<dshDir>/start-dsh-web.cmd)和桌面快捷方式(<桌面>\DSH Web.lnk,自动处理 OneDrive 桌面重定向)。
  2. 双击快捷方式 → 弹出控制台窗口 → 运行 pnpm dsh web → 打开 http://127.0.0.1:3080;关闭窗口即停止服务。
  3. 防重复启动:如果 dsh 已经在运行(端口被占用),不会重复启动,而是直接打开浏览器。
  4. 自动打开浏览器:服务启动数秒后自动打开网页(延时可配置)。
  5. TUI 中注册 /shortcut 命令:
命令 作用
/shortcut 或 /shortcut status 查看当前状态(含服务是否在运行)
/shortcut install 创建 / 刷新快捷方式与启动器
/shortcut remove 删除两者

安装

仅支持 Windows。插件尚未发布到 npm,直接从本 GitHub 仓库安装即可。

1. 把插件装进你的 dsh profile

dsh 自带插件管理器(在 profile 目录里执行 pnpm):

# web 配置(本插件的主要目标):
pnpm dsh plugin --profile web add git+https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git
# 或 TUI 配置(用于 /shortcut 命令):
pnpm dsh plugin --profile tui add git+https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git

2. 在 profile 的补丁层声明插件

在 ~/.dsh/profiles/web/cordis.patch.yml 末尾追加(默认是空列表):

- insert:
    - id: desktop-shortcut
      name: 'dsh-plugin-desktop-shortcut'
      config:
        autoInstall: true
        # dshDir: 'C:\path\to\your\dsh-checkout'   # 默认: process.cwd()
        # desktopName: 'DSH Web'
        # iconPath: 'C:\path\to\custom.ico'

3. 重启 dsh

pnpm dsh web

之后每次启动都会自动创建/刷新桌面「DSH Web」快捷方式(自带鲸鱼娘图标)。 TUI 用户则是多了 /shortcut 命令。

给其他机器排障:

  • dsh 的 loader 从 profile 目录(~/.dsh/profiles/web/)向上解析插件包, 所以必须用 dsh plugin --profile web add 装到那里——只装进 dsh 检出目录自己的 node_modules 是不会生效的。
  • 开了系统代理(如 Clash)的机器上,dsh plugin add 可能报 Unsupported proxy syntax——dsh CLI 会把 Windows 注册表里的代理原样传下去 (127.0.0.1:7897,没有协议头)导致 git 报错。解决办法:直接在 profile 目录里 手动执行 pnpm:
    cd ~/.dsh/profiles/web && pnpm add git+https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git
    

配置项

全部可选。

键 类型 默认值 说明
dshDir string process.cwd() dsh 检出目录(启动器写在这里)
port number 3080 Web 端口(用于防重复检测与浏览器地址)
desktopName string DSH Web 快捷方式文件名(自动加 .lnk)
autoInstall boolean true 加载时自动创建快捷方式
launcherPath string <dshDir>/start-dsh-web.cmd 启动器完整路径
desktopPath string <桌面>/<desktopName>.lnk 快捷方式完整路径
iconPath string 内置鲸鱼娘图标 自定义 .ico 图标路径(留空用系统默认)
openBrowser boolean true 启动后自动打开浏览器
preventDuplicate boolean true 已运行时不再重复启动
browserDelaySec number 60 轮询端口等待服务器就绪的最长秒数(冷启动可能很慢)

示例:

- insert:
    - id: desktop-shortcut
      name: 'dsh-plugin-desktop-shortcut'
      config:
        dshDir: 'C:\AAADXF\DSH\deepseek-harness-master'
        port: 3080
        desktopName: 'DSH Web'
        iconPath: 'C:\path\to\my-icon.ico'
        openBrowser: true
        preventDuplicate: true
        browserDelaySec: 4

开发

# 语法 / 导出冒烟测试(16 项,全部通过)
node tests/smoke.mjs

致谢

License

插件代码:MIT | 内置图标:CC BY-NC-SA 4.0(详见 assets/NOTICE.md)

原始 README: https://github.com/DXF1024/dsh-plugin-desktop-shortcut/blob/main/README.zh.md ↗