mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-12-06 15:12:30 +09:00
Bump version to 1.5.9 and add a Windows-only WebView2-based desktop console driven by an embedded React SPA. Introduces agent/internal/agentui with an embedded dist, an HTTP asset server, and platform-specific WebView2 launcher; adds console CLI command to open the window. Adds a new agent/ui React app (source, package.json, lockfile) and .gitignore entries for built UI. Update Go modules to include WebView2/winloader deps and update go.sum. Improve pairing wizard UX: use lowercase passphrase alphabet and add Copy buttons/clipboard support with transient feedback. Harden websocket client: disable permessage-deflate and set ngrok header to avoid tunnel interstitials. Update MSI packaging to auto-start service, grant user permissions for service and ProgramData config, and include Wix util extension in build script.
28 lines
1.0 KiB
Go
28 lines
1.0 KiB
Go
// Package agentui hosts the ServerKit agent's desktop console: a WebView2
|
|
// window driven by an embedded React SPA. It coexists with the legacy walk
|
|
// pairing wizard in setupui — the wizard handles first-run pairing today,
|
|
// and this package owns the post-pair "running app" experience that the
|
|
// tray previously delegated to a few menu items. Over the next milestones
|
|
// the wizard migrates here too so there's one window for everything.
|
|
package agentui
|
|
|
|
import (
|
|
"embed"
|
|
"io/fs"
|
|
)
|
|
|
|
// uiDist is the built React app from agent/ui/dist. The Makefile / CI must
|
|
// run `npm run build` in that folder before `go build`, otherwise the
|
|
// embed below fails at compile time. We accept that hard-fail so a release
|
|
// can never accidentally ship a stale or empty UI bundle.
|
|
//
|
|
//go:embed all:dist
|
|
var uiDist embed.FS
|
|
|
|
// distFS returns the embedded UI rooted at the dist/ directory so the HTTP
|
|
// server can serve "/" → "dist/index.html" without leaking the dist prefix
|
|
// into URLs.
|
|
func distFS() (fs.FS, error) {
|
|
return fs.Sub(uiDist, "dist")
|
|
}
|