Files
magpie/internal/agent/desktopapp_other.go
T
yetone 2a1637f4f6 agent: DeepSeek Harness Desktop is wired when installed but never opened, and found in any folder it was installed to on Windows (#2279, liangjinyuan-sihan)
DeepSeek Harness Desktop already reads magpie's route: its lib/main.js
(0.2.0-rc.2, the latest on its update feed, read from download.deepseek.com's
dmg and Windows installer) resolves $DSH_HOME, else ~/.dsh, and runs on
profiles/desktop, so the CLI's wiring applies. Three gaps remained:

- Installed but never opened, there is no ~/.dsh: the row wasn't listed,
  and connecting wrote the legacy config.yaml the app never reads. magpie
  now writes profiles/desktop/cordis.patch.yml from dsh's own template
  (PROFILE_PATCH_TEMPLATE) with its routes; the app's initProfile writes
  only missing files, so its first start keeps them. The notice says it
  starts on this when first opened (noticeDsh5, in all 5 languages).
  Disconnect before that first start removes what magpie made, when
  nothing else is there; afterwards only magpie's entries go.
- On Windows the installer lets the user pick the folder and registers it
  under HKCU\Software\1bf39983-50d0-5fe0-9ef4-cece76f67c5e InstallLocation
  (read from the NSIS script of dsh-latest-windows-x64.exe). magpie reads
  that, so a custom folder is found, and the Uninstall entry's
  DisplayVersion gives the version shown.

Tests: TestDshDesktopNeverOpened (pick on a never-opened app writes the
desktop profile, a user's key in .credentials.yaml and the user's own start
survive Disconnect, the app's first start is told apart),
TestDshDesktopRegisteredFolder (registry stubbed; exe must be there; WSL
twin has none).

Run on this tree, rebased onto 707fbb249:
- gofmt -l: clean; go vet darwin, GOOS=windows, GOOS=linux -tags nogui
- go test -tags nogui ./internal/agent/: ok (846s, loaded box)
- GUI, Chromium and WebKit: agent-notice-lang, gui-de, gui-ja,
  gui-zh-tw, agent-app-version, agent-cli-missing: 79 pass
Full suite: SUITE_LINE

Not tried: the real app was not run (Electron's userData isn't fully
redirected by a sandbox HOME); it was inspected statically (dmg mounted
read-only, app.asar extracted, NSIS header decoded). The registry reader
was not run on a real Windows install; the test stubs the registry.
2026-10-15 23:08:02 +08:00

8 lines
172 B
Go

//go:build !windows
package agent
func installedWindowsStorePackages() []string { return nil }
func registeredWindowsApp(string) (dir, version string) { return "", "" }