deepseek-harness
deepseek-ai
DeepSeek Harness: Everything is a Plugin.
Hope-Phenom/dsh-desktop-tray
EN: DSH Tray Assistant — a WPF tray companion for DeepSeek Harness: one-click Node.js/npm/dsh environment setup and Web UI lifecycle management. CN: DSH 托盘助手 — DeepSeek Harness 的 WPF 托盘扩展:一键配置 Node.js/npm/dsh 环境,托盘启停 Web UI。
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:Hope-Phenom/dsh-desktop-tray
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
A WPF (.NET Framework 4.6.2) desktop tray assistant for DeepSeek Harness (dsh). It lives in the tray and solves the usability pain of environment setup and Web UI start/stop — no more manual terminal windows, no more memorizing URLs.
Project page: hope-phenom.github.io/dsh-desktop-tray Repository: github.com/Hope-Phenom/dsh-desktop-tray
| Item | Capability |
|---|---|
| Node.js | Auto-detects version (PATH + common install locations); one-click install when missing: winget install OpenJS.NodeJS.LTS first, falling back to the official MSI (latest LTS fetched live); PATH refreshed automatically after install |
| npm mirror | Shows the current registry; can specify a mirror per-command for npm operations issued by this tool (--registry, your global config is untouched); optional "write global npmrc" (only affects the global config after explicit confirmation) |
| dsh | Local version vs. latest remote version (built-in semver comparison); one-click install/update (npm install -g @deepseek-ai/dsh@latest, explicit @latest avoids custom tag config traps); tray balloon when an update is available |
The whole health check is time-bounded (~2 min) with step-by-step progress; unreachable-network items degrade gracefully (e.g. "remote version query failed") — the UI never freezes.
--port 0, OS-assigned), launched hidden in the backgroundDSH_HOME concurrentlytaskkill /T /F); unexpected exits are detected, notified, and state is resetturn/end (each response round)dsh-notify-hook pluginsessionId, parentSessionId, turn, reason, and durationMsNotifications are only emitted when dsh is launched through dsh-desktop-tray (it injects
DSH_NOTIFY_ENABLED=1).
.dsh.bak-<date> as a backup, not a delete (recoverable) → remove the logon auto-start entry; full log streaming, cancellable; Node.js is NOT uninstalled%APPDATA%\DshNotifyicon\settings.json (atomic write; corrupt files are backed up and defaults restored)npm install -g @deepseek-ai/dsh (one-click installable/updatable from the tool)Requires Visual Studio (with the .NET Framework 4.6.2 targeting pack) or a command line with MSBuild.
msbuild DshNotifyicon.slnx /restore /p:Configuration=Release
Output: DshNotifyicon\bin\Release\DshNotifyicon.exe (double-click to run, no install).
NuGet dependencies: Hardcodet.NotifyIcon.Wpf (tray), Newtonsoft.Json (settings serialization).
To distribute, copy the exe together with
Hardcodet.NotifyIcon.Wpf.dll,Newtonsoft.Json.dll, and thetools\dsh-notify-hookfolder from the same output directory.
Install-type operations (Node.js / dsh) automatically switch to the Service tab's log panel to stream progress, while the Environment tab shows a progress bar; the install button turns into "Cancel" — click it anytime to abort (the process tree is cleaned up); on success the app returns to the Environment tab and re-runs the health check.
dsh-notify-hook plugin into the web profile.dsh's plugin management requires
pnpm. If pnpm is not installed, the tool automatically runsnpm install -g pnpmand then continues; you can also check it under the Health Check on the Environment tab and install it with one click.
turn/end.External command placeholders:
{event} {title} {sessionId} {parentSessionId} {turn} {reason} {durationMs}
Example:
Command: python
Arguments: E:\QuickStart\send_notification.py {sessionId} {reason} {durationMs}
DshNotifyicon.exe --smoke
Runs the environment check + a real dsh start/stop (random port) + HTTP probe, writing results to %TEMP%\DshNotifyiconSmoke.txt and exiting 0/1. No tray or window is created — suitable for automated regression.
taskkill /T /F): dsh persists sessions roughly every ~5s, so at most ~5s of trailing conversation may be lost (not a graceful shutdown)--host only supports 127.0.0.1 (a dsh limitation; the tool does not expose this option)| Symptom | Fix |
|---|---|
Manual npm in PowerShell reports "running scripts is disabled" |
Execution policy blocks npm.ps1 (PowerShell resolves .ps1 before .cmd). This tool is unaffected (it invokes npm-cli.js directly via node, no script shims). For manual use, call npm.cmd or run Set-ExecutionPolicy -Scope CurrentUser RemoteSigned (no admin needed) |
| Start DSH stays on "Starting" forever | Check the log panel: first launch initializes the web profile and may be slow; if the port is reported as busy, follow the dialog |
| dsh install fails (npm E404/ETARGET) | The tool always uses @latest to avoid custom tag issues; if it still fails, copy the log panel contents and investigate (network/mirror unreachable) |
| Node.js UAC prompt cancelled | The tool prints manual-install instructions for nodejs.org; run the health check again after installing |
| Auto-start doesn't work | Check the checkbox in Settings; enterprise/domain policy environments may disable the HKCU Run key (not an issue on personal PCs) |
| Health check seems stuck | Cannot happen: the whole check is time-bounded (120s), network queries cap at 45s each, and failures degrade to "check timed out / remote version query failed" instead of hanging; if still abnormal, check the log panel |
| Want data back after cleanup | Stop dsh, then rename %USERPROFILE%\.dsh.bak-<date> back to .dsh (contains credentials & sessions) |
| Tray icon disappeared | Single-instance behavior: launching the exe again activates the running instance; if it really exited, end DshNotifyicon.exe in Task Manager and relaunch |
| Tool crashes / becomes unresponsive | All exceptions are written to %APPDATA%\DshNotifyicon\crash-*.log (exception details + recent log snapshot) and a tray balloon is shown on next start; send that file to the developer after reproducing |
DshNotifyicon/
├─ DshNotifyicon.slnx Solution
├─ DshNotifyicon/
│ ├─ App.xaml(.cs) Single instance, tray lifecycle, --smoke mode, event wiring, applies UI language at startup
│ ├─ MainWindow.xaml(.cs) Environment / Service / Settings / Notification Enhancements / About tabs; refreshes all static texts on language switch
│ ├─ TrayIcon.cs Tray icon & menu (built in code with Hardcodet; texts refresh with the language)
│ ├─ AppServices.cs Service container: settings / DSH process / main window / tray
│ ├─ Services/
│ │ ├─ Settings.cs Settings model (incl. Language field & notification settings) & atomic persistence
│ │ ├─ Localization.cs CN/EN string table, auto-detection & language switching (Loc.T / Loc.Changed)
│ │ ├─ ProcessRunner.cs Hidden process execution, separated stdout/stderr, timeout, process-tree kill
│ │ ├─ NodeService.cs Node.js detection / winget+MSI install / PATH refresh
│ │ ├─ NpmService.cs npm wrapper (@latest, per-command --registry, serialized queue, semver)
│ │ ├─ DshProcessManager.cs State machine, preflight, URL parsing, health probe, start/stop, DSH_NOTIFY parsing
│ │ └─ EnvironmentCheckService.cs Health-check aggregation
│ └─ Assets/app.ico Icon (rendered from DeepSeek's official favicon.svg; app-running has a green dot)
└─ tools/
├─ dsh-notify-hook/ dsh plugin that emits DSH_NOTIFY lines on turn/end
├─ gen-icons.js Icon regeneration script (node)
└─ favicon.svg Official icon source
site/ is the GitHub Pages landing-page source (single-file bilingual index.html + icon assets), auto-deployed by .github/workflows/pages.yml to hope-phenom.github.io/dsh-desktop-tray.
LangVersion=7.3), no runtime to ship; the service layer has no WPF dependency for headless verification<Compile Include> entries — a new source file (e.g. Services\Localization.cs) must be added manuallyLoc.T("key") — hardcoded strings are forbidden; register new texts in the Localization.cs table first ([0]=zh, [1]=en); language switches propagate through the Loc.Changed eventnode tools/gen-icons.js (reuses sharp from the dsh dependency tree; npm i -g sharp also works), then rebuild (icons are embedded resources)@latest; mirrors are injected per-command via --registry; external-instance scanning uses PowerShell -EncodedCommand to avoid quote-escaping issues; stdout/stderr are collected separately to keep parsing cleanCLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。