Documentation
¶
Overview ¶
Package nativeui is the entry point of the native desktop UI (MyGo): Run connects the API client, builds the app context and the root view with every registered area, and runs the window on the main goroutine.
Layout of the tree (see README.md):
client/ Pando HTTP API client (no MyGo) i18n/ Web UI catalogs + T() kit/ theme, icons, base components shell/ MyGo app, window, menus app/ Context, area registry, router, layout app/<area>/ one package per area (chat, settings, ...)
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNoDisplay = shell.ErrNoDisplay
ErrNoDisplay is returned by Run when no display server is reachable.
Functions ¶
func AcquireSingleInstance ¶
AcquireSingleInstance makes `pando desktop` focus the window of a running native desktop instead of starting a second one. key is the working directory: different directories (a project's own window, spawned with `pando desktop --cwd`) are different instances. It returns false after handing the command line to the running instance; call it before any server or database starts. PANDO_DESKTOP_MULTI=1 disables the lock.
Types ¶
type Options ¶
type Options struct {
// Ctx ends the app when canceled (signals, server shutdown).
Ctx context.Context
// BaseURL of the Pando API server.
BaseURL string
// Token is the API token when known (in-process server); otherwise it
// is fetched from /api/v1/token.
Token string
// CWD is the working directory the server runs in (window title).
CWD string
// Language selects the UI language ("" uses $LANG, falling back to en).
Language string
// Theme selects the theme (zero value: Pando following the system).
Theme kit.Settings
// Path is the route opened first (default /chat).
Path string
// Simple opens the simple chat (`pando desktop --simple`).
Simple bool
// Logger receives UI logs (default slog.Default()).
Logger *slog.Logger
}
Options configures Run.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package app is the core of the native desktop UI: the app-wide Context handed to every view, the registry of areas (chat, settings, files, ...), the router and the window layout (sidebar, header, content).
|
Package app is the core of the native desktop UI: the app-wide Context handed to every view, the registry of areas (chat, settings, files, ...), the router and the window layout (sidebar, header, content). |
|
agentvcs
Package agentvcs is the Agent VCS area (route /snapshots, as in the Web UI): the sessions that have agent commits, their commit log, the files each commit changed with a side-by-side diff viewer (MyGo ui/editor DiffView), revert of a commit or of single files, and the named project snapshots.
|
Package agentvcs is the Agent VCS area (route /snapshots, as in the Web UI): the sessions that have agent commits, their commit log, the files each commit changed with a side-by-side diff viewer (MyGo ui/editor DiffView), revert of a commit or of single files, and the named project snapshots. |
|
chat
Package chat is the chat area of the native desktop: the sessions list, session history and streaming runs (P0 MVP; P1 brings parity with the Web UI: tool cards, diffs, questions, plan/goal, model picker, slash and @).
|
Package chat is the chat area of the native desktop: the sessions list, session history and streaming runs (P0 MVP; P1 brings parity with the Web UI: tool cards, diffs, questions, plan/goal, model picker, slash and @). |
|
design
Package design is the Design Studio area of the native desktop: the artifact and template galleries at /design and one artifact's Studio at /design/{id} (web-ui components/design + designStore).
|
Package design is the Design Studio area of the native desktop: the artifact and template galleries at /design and one artifact's Studio at /design/{id} (web-ui components/design + designStore). |
|
editor
Package editor is the code editor area of the native desktop: a file explorer, open-file tabs, a code editor (MyGo ui/editor, with find bar, folding, multi-cursor and syntax highlighting), image/PDF viewers and a status bar.
|
Package editor is the code editor area of the native desktop: a file explorer, open-file tabs, a code editor (MyGo ui/editor, with find bar, folding, multi-cursor and syntax highlighting), image/PDF viewers and a status bar. |
|
evaluator
Package evaluator is the self-improvement area: metrics cards, the daily evaluations chart, the UCB ranking of prompt variants, learned skills with approve/reject, the evaluated sessions with their score explanation and the doctor banner.
|
Package evaluator is the self-improvement area: metrics cards, the daily evaluations chart, the UCB ranking of prompt variants, learned skills with approve/reject, the evaluated sessions with their score explanation and the doctor banner. |
|
extensions
Package extensions is the extension UI of the native desktop: the sidebar page at /ext/{panelId} and the slots (sidebar, settings, chat-side, status-bar) other areas embed.
|
Package extensions is the extension UI of the native desktop: the sidebar page at /ext/{panelId} and the slots (sidebar, settings, chat-side, status-bar) other areas embed. |
|
instances
Package instances is the instances area: the Pando instances running on this machine grouped by project path, and for the selected one its sessions with the conversation history, the live event stream (/instances/{id}/sessions/{sid}/stream), a message box and cancel.
|
Package instances is the instances area: the Pando instances running on this machine grouped by project path, and for the selected one its sessions with the conversation history, the live event stream (/instances/{id}/sessions/{sid}/stream), a message box and cancel. |
|
logs
Package logs is the native Logs area: the server log buffer as a table with level and text filters, auto-scroll and a detail panel.
|
Package logs is the native Logs area: the server log buffer as a table with level and text filters, auto-scroll and a detail panel. |
|
orchestrator
Package orchestrator is the native Orchestrator area: Mesnada tasks (list, detail, create, cancel, delete), delegation metrics and the CronJobs panel.
|
Package orchestrator is the native Orchestrator area: Mesnada tasks (list, detail, create, cancel, delete), delegation metrics and the CronJobs panel. |
|
overlays
Package overlays holds the window-level layers of the native desktop that the Web UI draws over its layout: the quick menu (command palette), the model switcher, the config-init banner and the update notice.
|
Package overlays holds the window-level layers of the native desktop that the Web UI draws over its layout: the quick menu (command palette), the model switcher, the config-init banner and the update notice. |
|
projects
Package projects is the native Projects area and the project workspaces: the registry of projects (add, rename, stop, delete, init) and the tabs that open a project's child instance inside the shell.
|
Package projects is the native Projects area and the project workspaces: the registry of projects (add, rename, stop, delete, init) and the tabs that open a project's child instance inside the shell. |
|
settings
Package settings is the settings area of the native desktop: the 23 categories of the Web UI settings (web-ui/src/components/settings), their unsaved-changes guard and the "?section=" deep link.
|
Package settings is the settings area of the native desktop: the 23 categories of the Web UI settings (web-ui/src/components/settings), their unsaved-changes guard and the "?section=" deep link. |
|
setup
Package setup is the first-run setup assistant of the native desktop (the Web UI's SetupWizard): scope, provider, models, Remembrances and a summary.
|
Package setup is the first-run setup assistant of the native desktop (the Web UI's SetupWizard): scope, provider, models, Remembrances and a summary. |
|
terminal
Package terminal is the Terminal area of the native desktop: tabs of interactive shells running in real PTYs on the server, shown by MyGo's terminal plugin (libghostty-vt, loaded at run time without cgo) and fed by the WebSocket PTY endpoint /api/v1/terminal/pty, the same one the Web UI's xterm.js pane uses (binary frames carry I/O, JSON text frames carry ready/exit/resize/close).
|
Package terminal is the Terminal area of the native desktop: tabs of interactive shells running in real PTYs on the server, shown by MyGo's terminal plugin (libghostty-vt, loaded at run time without cgo) and fed by the WebSocket PTY endpoint /api/v1/terminal/pty, the same one the Web UI's xterm.js pane uses (binary frames carry I/O, JSON text frames carry ready/exit/resize/close). |
|
Package client is the Go client of the Pando HTTP API used by the native desktop UI.
|
Package client is the Go client of the Pando HTTP API used by the native desktop UI. |
|
Package i18n translates the native desktop UI with the Web UI's own catalogs (web-ui/src/i18n/locales, copied into ./locales; a test keeps the copies in sync).
|
Package i18n translates the native desktop UI with the Web UI's own catalogs (web-ui/src/i18n/locales, copied into ./locales; a test keeps the copies in sync). |
|
Package kit is the Pando component library of the native desktop: the Web UI design tokens (web-ui/src/styles/tokens.css) ported onto MyGo's ui.Theme, an embedded lucide icon subset, and small components built on MyGo's widget bases.
|
Package kit is the Pando component library of the native desktop: the Web UI design tokens (web-ui/src/styles/tokens.css) ported onto MyGo's ui.Theme, an embedded lucide icon subset, and small components built on MyGo's widget bases. |
|
Package natives ships the native libraries of the desktop UI inside the pando binary, so every distribution (CLI zip, Pando.app, .pkg) is one self-contained executable.
|
Package natives ships the native libraries of the desktop UI inside the pando binary, so every distribution (CLI zip, Pando.app, .pkg) is one self-contained executable. |
|
Package shell bootstraps the native desktop on MyGo: the application, the main window with native decorations, and the application menu.
|
Package shell bootstraps the native desktop on MyGo: the application, the main window with native decorations, and the application menu. |