Files
ServerKit/agent/ui/vite.config.js
T
Juan Denis 11e3b1ceef Add WebView2-based agent console and UI
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.
2026-04-29 19:40:10 -04:00

25 lines
880 B
JavaScript

import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
// The agent embeds the built dist directly into the Go binary via embed.FS,
// then serves it from a localhost HTTP server inside WebView2. Assets are
// referenced relatively so the served base URL doesn't matter.
export default defineConfig({
plugins: [react()],
base: './',
server: {
port: 5174,
strictPort: true,
},
build: {
// Output directly into the Go package that embeds it, so the only
// build orchestration is "npm run build" then "go build" — no
// separate copy step. The dir is gitignored; embed requires it to
// exist at compile time, so the Makefile / docs make the order
// explicit.
outDir: '../internal/agentui/dist',
emptyOutDir: true,
chunkSizeWarningLimit: 800,
},
});