desktop

command
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Command dsc-desktop is the Wails v3 desktop wrapper for DeepSeekCode.

It launches a Wails v3 window that loads the compiled React SPA from the embedded webapp package. The gateway port is passed to the frontend via App.GetPort() so the SPA can construct /v1/* URLs in Wails dev mode (where the Vite proxy is not active).

Gateway wiring (two paths over ONE shared handler, built by App.gatewayHandler):

  • Webview (primary): the gateway is composed into the Wails asset server via AssetOptions.Middleware (gatewayMiddleware) so /v1/* is served at the webview origin. The packaged .app loads the SPA from the asset origin, not from http://127.0.0.1:<port>, so the SPA's relative /v1 fetches resolve same-origin here — no port URL, no CORS, no SPA change.
  • Loopback (fallback): ServiceStartup also serves the same handler on 127.0.0.1:<defaultGatewayPort> via gateway.ServeHandler, so `open http://127.0.0.1:7432` in a browser works and shares session state. It binds loopback and shuts down when the v3 application context is cancelled on exit. See app.go.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL