Files
Reims-Go/frontend/src/wails.ts
T
NwflowerandClaude Opus 5.5 c0f08be124 feat: per-VM CPU affinity, disk snapshots, SSH helpers and VM window actions
Backend
- Per-VM CPU affinity (vmstart/affinity.go, affinity_flow.go): modes auto /
  all / P-cores / non-LP-E / custom, saved in the VM folder, applied to the
  QEMU process on start (GUI and CLI) and live via SetVMAffinity; copied on
  clone. Start summary logs the resolved mapping. Host report gains CPU
  topology helpers (mask <-> CPU list).
- Offline qcow2 restore points via qemu-img (driver/reims/snapshot.go,
  snapshot_flow.go): list / create / restore / delete.
- SSH helpers (ssh_flow.go): remembered user, open a terminal, write an
  ~/.ssh/config entry, open VS Code Remote-SSH.
- FocusVMWindow brings the QEMU window forward (restoring it if minimized);
  CopyVMScreenshot copies a full-resolution frame to the clipboard.
- DeliverPathsToGuest copies dropped host files into the shared folder;
  main.go enables Wails file drop on elements marked --wails-drop-target.
- VM note (.reims-go-note) and a storage breakdown (extras_flow.go).

Frontend
- VM page: running state's "Show Window" and the screen preview use
  FocusVMWindow; camera button and More-menu item copy a screenshot;
  editable note under the name; SSH row shows the saved user with
  Terminal / config / VS Code actions; restore-point list; install guide
  steps can be ticked off; drop files onto the page to send them.
- Sidebar right-click menu per VM (start, show window, screenshot, stop,
  restart, settings, folders, clone, delete); double-click and Ctrl+Enter
  still run the main action.
- AffinityDialog opened from the VM menu and VM settings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 04:00:48 -07:00

24 lines
1.2 KiB
TypeScript

// Backend calls are the Wails-generated bindings (wailsjs/go/app/App). Only
// the calls whose results carry the unions or nil slices added in types.ts are
// re-typed here; everything else passes through unchanged.
import * as Go from '../wailsjs/go/app/App'
import { EventsOn } from '../wailsjs/runtime/runtime'
import type { AppState, CachedInstaller, DataRootChoice, LogEntry, RemoteRuntime, Task, VMAffinityStatus, VMAffinityUpdate } from './types'
export const api = {
...Go,
GetState: Go.GetState as () => Promise<AppState>,
GetTasks: Go.GetTasks as () => Promise<Task[]>,
GetVMAffinity: Go.GetVMAffinity as (name: string) => Promise<VMAffinityStatus>,
SetVMAffinity: Go.SetVMAffinity as (name: string, req: VMAffinityUpdate) => Promise<VMAffinityStatus>,
ListInstallers: Go.ListInstallers as () => Promise<CachedInstaller[] | null>,
ListRemoteRuntimes: Go.ListRemoteRuntimes as () => Promise<RemoteRuntime[] | null>,
SuggestDataRoots: Go.SuggestDataRoots as () => Promise<DataRootChoice[] | null>,
}
export const events = {
onTask: (cb: (task: Task) => void) => EventsOn('reims:task', cb),
onStateChanged: (cb: () => void) => EventsOn('reims:state-changed', cb),
onLog: (cb: (entry: LogEntry) => void) => EventsOn('reims:log', cb),
}