Help us shape the future of Go! Take the 2026 Go Developer Survey

extensions

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

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.

The Web UI mounts runtime ES-module panels through window.__PANDO_UI__ (web-ui src/lib/pandoUI.ts). Natively each panel runs in an embedded web view (kit.WebPane) that loads a small host page Pando serves (GET /api/v1/extensions/host?panel=<id>, internal/api) providing the same __PANDO_UI__ v1 contract. The one thing it cannot provide is ctx.react (the shell's React lives in the bundled WebUI): panels that need it show a clear error in their box, and "Open in browser" loads the WebUI route /ext/<id>.

For the settings agent and the chat/status areas (see slot.go):

extensions.Panels(a, client.SlotSettings)      // sections to add ("ext:<id>")
extensions.Slot(a, c, client.SlotSettings, id, 0) // draw one panel
extensions.Slot(a, c, client.SlotChatSide, "", 220) // every chat-side panel
extensions.Slot(a, c, client.SlotStatusBar, "", 28)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostURL

func HostURL(cl *client.Client, panelID, token, theme string) string

HostURL is the address the embedded web view loads for a panel: the server-served host page with the API token (a navigation cannot carry a header) and the theme.

func Panels

func Panels(a *app.Context, slot string) []client.ExtensionPanel

Panels returns the panels the build contributes to a slot, in order. It is empty on standard builds and before the manifest loaded (the settings area redraws when it arrives).

func Slot

func Slot(a *app.Context, c *ui.Context, slot, panelID string, height float32)

Slot draws the panels registered for a slot ("sidebar", "settings", "chat-side", "status-bar") one under another, or only panelID when given. height > 0 fixes each panel's height (use it for compact slots such as the status bar); 0 lets a single panel fill the available space. Standard builds have no panels and Slot draws nothing, so it can be dropped into a layout unconditionally.

Types

This section is empty.

Jump to

Keyboard shortcuts

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