dsh-plugin-desktop-shortcut
其他 活跃维护

dsh-plugin-desktop-shortcut

DXF1024/dsh-plugin-desktop-shortcut

轻量级桌面快捷方式生成插件,支持自定义图标与快捷路径配置,操作简单无冗余步骤,无需复杂设置即可快速完成桌面快捷方式创建,兼容主流桌面操作系统。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
234 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:DXF1024/dsh-plugin-desktop-shortcut
git clone https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git
git clone git@github.com:DXF1024/dsh-plugin-desktop-shortcut.git
README.md main

dsh-plugin-desktop-shortcut

version
license
platform
stars
issues
language
powered_by_dsh

English | 中文

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

✨ Zero runtime dependencies (Node builtins only). Windows-only.
🐳 Bundled cute DeepSeek whale-girl icon (CC BY-NC-SA 4.0, see assets/NOTICE.md).

Features

  1. On plugin load, writes a small .cmd launcher next to your dsh checkout
    (<dshDir>/start-dsh-web.cmd) and creates <Desktop>\DSH Web.lnk pointing
    at it (handles OneDrive desktop redirection).
  2. Double-click the shortcut → a console window opens → pnpm dsh web runs →
    open http://127.0.0.1:3080. Closing the window stops the service.
  3. Duplicate-run guard: if dsh is already listening on the port, the
    launcher skips starting a second instance and just opens the browser.
  4. Auto-open browser: opens the web UI a few seconds after the server
    boots (configurable delay).
  5. In the TUI, registers a /shortcut command:
Command Effect
/shortcut or /shortcut status Show current state (including whether the server is running)
/shortcut install Create / refresh the shortcut and launcher
/shortcut remove Delete both files

Install

Windows only. The plugin is not published to npm yet — install it straight
from this GitHub repo.

1. Install the package into your dsh profile

dsh ships a plugin manager that runs pnpm inside the profile directory:

# web profile (this plugin's main target):
pnpm dsh plugin --profile web add git+https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git
# or the TUI profile (for the /shortcut command):
pnpm dsh plugin --profile tui add git+https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git

2. Declare it in the profile's patch layer

Append to ~/.dsh/profiles/web/cordis.patch.yml (it is an empty list by default):

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

3. Restart dsh

pnpm dsh web

From now on every start creates/refreshes a "DSH Web" desktop shortcut
(whale-girl icon included). TUI users get the /shortcut command instead.

Troubleshooting for other machines:

  • The loader resolves plugin packages from the profile directory
    (~/.dsh/profiles/web/), so the package must be installed there via
    dsh plugin --profile web add — installing it into the dsh checkout's own
    node_modules does NOT work.
  • On machines with a system proxy (e.g. Clash), dsh plugin add may fail
    with Unsupported proxy syntax because the CLI forwards the raw Windows
    proxy (127.0.0.1:7897, no scheme) to git. Workaround — run pnpm directly
    in the profile directory:
    cd ~/.dsh/profiles/web && pnpm add git+https://github.com/DXF1024/dsh-plugin-desktop-shortcut.git

Configuration

All fields are optional.

Key Type Default Meaning
dshDir string process.cwd() dsh checkout directory (launcher is written here)
port number 3080 Web UI port (used for the duplicate guard and browser URL)
desktopName string DSH Web Shortcut file name (.lnk appended)
autoInstall boolean true Create the shortcut automatically on load
launcherPath string <dshDir>/start-dsh-web.cmd Full path of the launcher script
desktopPath string <Desktop>/<desktopName>.lnk Full path of the .lnk file
iconPath string bundled whale-girl icon Custom .ico path (empty = system default)
openBrowser boolean true Auto-open the browser after startup
preventDuplicate boolean true Don't start a second instance if already running
browserDelaySec number 60 Max seconds to poll the port before opening the browser (server cold starts can be slow)

Example:

- 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

Development

# syntax / export smoke test (16 checks)
node tests/smoke.mjs

Credits

License

Plugin code: MIT | Bundled icon: CC BY-NC-SA 4.0 (see assets/NOTICE.md)