Documentation
¶
Overview ¶
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
templ: version: v0.3.1020
Index ¶
- func AgentsLayout(vm AgentsLayoutVM) templ.Component
- func ChannelConfigPage(vm ChannelConfigVM) templ.Component
- func ChannelListPage(vm ChannelListVM) templ.Component
- func ConnectorsPage(vm ConnectorsSPAVM) templ.Component
- func Conversation(vm ConversationVM) templ.Component
- func DataTableDetailPage(vm DataTableDetailVM) templ.Component
- func DataTablesPage(vm DataTablesVM) templ.Component
- func NewSessionSPA(vm NewSessionSPAVM) templ.Component
- func OverviewSPA(vm OverviewSPAVM) templ.Component
- func PresetsSPA(vm PresetsSPAVM) templ.Component
- func ProjectSettingsSPA(vm ProjectSettingsSPAVM) templ.Component
- func ProviderSpawnDetail(vm ProviderSpawnDetailVM) templ.Component
- func ProvidersSPA(vm ProvidersSPAVM) templ.Component
- func RestDocs(vm RestDocsVM) templ.Component
- func SettingsPage(vm SettingsVM) templ.Component
- func SkillsSPA(vm SkillsSPAVM) templ.Component
- type AgentsLayoutVM
- type ChannelConfigVM
- type ChannelListVM
- type ChannelVM
- type ConnectorsSPAVM
- type ConversationVM
- type DataTableDetailVM
- type DataTableRow
- type DataTablesVM
- type FilterChip
- type GateStatusVM
- type LiveProcessVM
- type MCPClientStatusVM
- type MCPStatusVM
- type NewSessionSPAVM
- type OverviewSPAVM
- type PresetsSPAVM
- type ProjectSettingsSPAVM
- type ProviderCapVM
- type ProviderChoiceVM
- type ProviderSpawnDetailVM
- type ProvidersSPAVM
- type RestDocsVM
- type SessionLifecycleVM
- type SettingsVM
- type SkillsSPAVM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AgentsLayout ¶
func AgentsLayout(vm AgentsLayoutVM) templ.Component
AgentsLayout wraps every Agents page with a full-screen Claude-style shell: sidebar left (nav + recent sessions) and flex-1 main content area.
func ChannelConfigPage ¶
func ChannelConfigPage(vm ChannelConfigVM) templ.Component
ChannelConfigPage shows config fields for one channel.
func ChannelListPage ¶
func ChannelListPage(vm ChannelListVM) templ.Component
ChannelListPage shows available channels as cards.
func ConnectorsPage ¶ added in v0.22.2
func ConnectorsPage(vm ConnectorsSPAVM) templ.Component
ConnectorsPage renders the manager SPA mount point inside AgentsLayout. data-base is the manager client-route prefix, so the SPA boots straight into its connectors view and stays self-consistent.
func Conversation ¶ added in v0.19.0
func Conversation(vm ConversationVM) templ.Component
Conversation renders the conversation SPA shell inside the agents chrome. The SPA reads data-base from the #app div and uses it as the prefix for all API calls (e.g. ${base}/api/sessions).
func DataTableDetailPage ¶ added in v0.13.1
func DataTableDetailPage(vm DataTableDetailVM) templ.Component
func DataTablesPage ¶ added in v0.13.1
func DataTablesPage(vm DataTablesVM) templ.Component
func NewSessionSPA ¶ added in v0.19.0
func NewSessionSPA(vm NewSessionSPAVM) templ.Component
NewSessionSPA renders the new-session compose SPA shell inside the agents chrome. The SPA reads data-base from the #app div and uses it as the prefix for all API calls (e.g. ${base}/providers/options).
func OverviewSPA ¶ added in v0.19.0
func OverviewSPA(vm OverviewSPAVM) templ.Component
OverviewSPA renders the overview SPA shell inside the agents chrome. The SPA reads data-base from the #app div and uses it as the prefix for all API calls (e.g. ${base}/api/overview).
func PresetsSPA ¶ added in v0.19.0
func PresetsSPA(vm PresetsSPAVM) templ.Component
PresetsSPA renders the presets SPA shell inside the agents chrome. The SPA reads data-base from the #app div and uses it as the prefix for all API calls (e.g. ${base}/api/presets).
func ProjectSettingsSPA ¶ added in v0.19.0
func ProjectSettingsSPA(vm ProjectSettingsSPAVM) templ.Component
ProjectSettingsSPA renders the project-settings SPA shell inside the agents chrome. The SPA reads data-base and data-project-id from the #app div.
func ProviderSpawnDetail ¶
func ProviderSpawnDetail(vm ProviderSpawnDetailVM) templ.Component
ProviderSpawnDetail renders the event timeline of one spawn log file.
func ProvidersSPA ¶ added in v0.19.0
func ProvidersSPA(vm ProvidersSPAVM) templ.Component
ProvidersSPA renders the providers SPA shell inside the agents chrome. The SPA reads data-base from the #app div and uses it as the prefix for all API calls (e.g. ${base}/api/providers).
func RestDocs ¶ added in v0.10.0
func RestDocs(vm RestDocsVM) templ.Component
RestDocs renders usage docs for the three OpenAI-compatible routes the REST channel exposes. Top section is the common contract (base URL, auth, streaming, approvals); below it a tab strip jumps between per-endpoint examples.
func SettingsPage ¶ added in v0.10.0
func SettingsPage(vm SettingsVM) templ.Component
SettingsPage renders agents settings inside AgentsLayout. The system_prompt row is broken out into its own panel so the textarea can render full-height and carry a Reset-to-default button. Remaining rows fall back to the generic ConfigsTable. POSTs target /manager/tools/agents/configs/{key}.
func SkillsSPA ¶ added in v0.19.0
func SkillsSPA(vm SkillsSPAVM) templ.Component
SkillsSPA renders the skills SPA shell inside the agents chrome. The SPA reads data-base from the #app div and uses it as the prefix for all API calls (e.g. ${base}/api/skills).
Types ¶
type AgentsLayoutVM ¶ added in v0.10.0
type AgentsLayoutVM struct {
Base string
ActivePage string
SidebarIDs []string
SidebarSessions map[string]session.Session
SidebarLifecycle map[string]SessionLifecycleVM
SidebarLabels map[string]string // session id → first user message preview
ActiveSessionID string
IdleTimeoutMs int64
// Projects powers the sidebar Projects section + per-row project
// chips. Keyed by project id; ProjectList is the display order.
Projects map[string]project.Project
ProjectList []string
// ProjectCounts is the number of sessions bound to each project id
// (sidebar pill). ScopedProjectID, when set, highlights the active
// project row + drives the scoped breadcrumb.
ProjectCounts map[string]int
ScopedProjectID string
// PinnedProjectID is the current user's pinned (personal-default)
// project id, shown with a 📌 in the sidebar. Empty = none.
PinnedProjectID string
// FullBleed=true skips the layout's default px-6 py-6 padding
// wrapper so the page can paint edge-to-edge. The workflow
// editor needs the full viewport for its canvas; padded pages
// (sessions, presets, …) leave this false.
FullBleed bool
// ShellAssetURL is the hashed bundle URL for the agents-shell island
// (fe/agents/shell). AgentsLayout emits a <script type="module"> for
// this URL so every agents page gets pin + drag-to-move sidebar
// behaviors. Empty when the bundle has not been built yet (dev
// machine before npm run build).
ShellAssetURL string
}
AgentsLayoutVM carries sidebar data for the full-screen Claude-style shell.
func (AgentsLayoutVM) NewSessionHref ¶ added in v0.14.21
func (vm AgentsLayoutVM) NewSessionHref() string
NewSessionHref is the "New session" nav target. When the sidebar is scoped to a project, it carries `?project=<id>` so the compose form auto-selects that project (mockup ②).
func (AgentsLayoutVM) ProjectIcon ¶ added in v0.14.21
func (vm AgentsLayoutVM) ProjectIcon(id string) string
ProjectIcon returns the emoji icon for a project id (📁 fallback).
func (AgentsLayoutVM) ProjectName ¶ added in v0.14.21
func (vm AgentsLayoutVM) ProjectName(id string) string
ProjectName returns the display name for a project id, or the id itself when unknown. Used by sidebar / session rows.
type ChannelConfigVM ¶
type ChannelConfigVM struct {
Layout AgentsLayoutVM
Base string
ChannelName string
ChannelSlug string
Rows []entity.Config
ActionBase string
// Docs is an optional component rendered below the config table.
// Channels use it to surface usage notes, sample requests, or links
// to related pages (e.g. PAT management for REST).
Docs templ.Component
}
ChannelConfigVM is the view model for a single channel's config page.
type ChannelListVM ¶
type ChannelListVM struct {
Layout AgentsLayoutVM
Base string
Channels []ChannelVM
}
ChannelListVM is the view model for the Channels index page.
type ChannelVM ¶
type ChannelVM struct {
Name string
Slug string // "slack" | "telegram"
Icon string
Description string
Configured bool // true when the required credential is set
HRef string // link to config page
}
ChannelVM is one channel card on the channels list page.
type ConnectorsSPAVM ¶ added in v0.22.2
type ConnectorsSPAVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
// Deep is an optional client-route path (e.g. /connectors/slack/123)
// forwarded by manager's connectors→agents redirect. The SPA router
// reads it from data-deep on boot to open that view directly, so a
// reload/deep link of a /manager/connectors URL lands on the same page
// inside the Agents shell rather than the connectors index.
Deep string
}
ConnectorsSPAVM hosts the manager SPA inside the Agents chrome. Base + AssetURL come from manager.SPAMount() — the SAME bundle the /manager pages serve, with the client router still rooted at /manager. Mounting it here just swaps the outer shell (Agents sidebar instead of the manager navbar); every in-SPA API call and link keeps resolving against the live /manager/* routes, so no connector code moves.
type ConversationVM ¶ added in v0.19.0
type ConversationVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
ScmAsset string
InitialSession string
IdleTimeoutMs int
}
ConversationVM feeds the thin-shell that hosts the conversation SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("conversation"); ScmAsset is the hashed SCM bundle path used by the docked source-control panel. InitialSession, when non-empty, causes the SPA to deep-link directly to that session on load via the #app data-initial-session attribute. IdleTimeoutMs is the agents idle_timeout_sec × 1000, used by the SPA idle lifecycle badge for the "kill in Ns" countdown.
type DataTableDetailVM ¶ added in v0.13.1
type DataTableDetailVM struct {
Layout AgentsLayoutVM
Base string
Slug string
Schema datatable.Schema
Rows []map[string]any
Flash string
SortCol string
SortDir string // "asc" | "desc"
Filters map[string]FilterChip // keyed by column name
}
DataTableDetailVM is the per-table page model.
SortCol/SortDir + Filters drive the spreadsheet header indicators (active sort arrow + funnel highlight) and let the filter popover pre-fill its inputs from the live URL. Both are populated by the handler from query params; an empty SortCol means "default id ASC".
type DataTableRow ¶ added in v0.13.1
type DataTableRow struct {
Slug string
Name string
RowCount int
Columns int
SizeBytes int64
UpdatedAt time.Time
CreatedAt time.Time
}
DataTableRow summarises one data table on the list page.
type DataTablesVM ¶ added in v0.13.1
type DataTablesVM struct {
Layout AgentsLayoutVM
Base string
Tables []DataTableRow
Flash string
}
DataTablesVM is the model for the Data Tables list page.
type FilterChip ¶ added in v0.13.1
FilterChip is one applied filter for a column. Op is one of the datatable.Op* constants; Value is "" for is_empty / is_not_empty.
type GateStatusVM ¶
type GateStatusVM struct {
Enabled bool
Binary string // absolute path (when enabled)
Source string // "sibling" | "embed" | "path" — debug aid
Reason string // why disabled, when Enabled=false
Note string // human-readable behavior summary; rendered as-is
// PermissionMode is the active value of GateConfig.PermissionMode
// ("on" | "bypass"). "bypass" means the spawner strips the hook
// config and runs unguarded — UI surfaces that as a locked badge
// so operators can't toggle individual provider hooks (no-op).
PermissionMode string
// BypassLocked is true when PermissionMode=="bypass". Retained for
// templ branches that already key off this flag; equivalent to
// PermissionMode == "bypass".
BypassLocked bool
}
GateStatusVM is the umbrella "what is the gate doing right now?" card on the Providers page. Gate covers two sub-policies — the permission prompt and the ask_user MCP tool — so the VM carries both, plus the boot-time binary resolution state for the permission hook.
type LiveProcessVM ¶ added in v0.15.2
type LiveProcessVM struct {
SessionID string
AgentName string
PID int
Lifecycle string // "spawning" | "working" | "idle" | "killed"
Substate string
}
LiveProcessVM is one row in the Active Processes panel on the Providers page.
type MCPClientStatusVM ¶ added in v0.13.0
type MCPClientStatusVM struct {
ID string // "claude", "cursor", "gemini", "codex", "claude-code"
Label string // "Claude Desktop", "Cursor", …
Detected bool // client config dir exists on this host
Installed bool // wick entry present in client's mcpServers
Blocklisted bool // user manually uninstalled — skip auto-install
ConfigPath string // absolute path to config file (for tooltip)
}
MCPClientStatusVM is one row in the MCP Wick card — one per detected MCP client (Claude Desktop, Cursor, Gemini CLI, etc.).
type MCPStatusVM ¶ added in v0.13.0
type MCPStatusVM struct {
AppName string
Clients []MCPClientStatusVM
}
MCPStatusVM is the aggregate for the MCP Wick card on the Providers page.
type NewSessionSPAVM ¶ added in v0.19.0
type NewSessionSPAVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
}
NewSessionSPAVM feeds the thin-shell that hosts the new-session compose SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("new-session").
type OverviewSPAVM ¶ added in v0.19.0
type OverviewSPAVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
}
OverviewSPAVM feeds the thin-shell that hosts the overview SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("overview").
type PresetsSPAVM ¶ added in v0.19.0
type PresetsSPAVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
}
PresetsSPAVM feeds the thin-shell that hosts the presets SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("presets").
type ProjectSettingsSPAVM ¶ added in v0.19.0
type ProjectSettingsSPAVM struct {
Layout AgentsLayoutVM
Base string
ProjectID string
AssetURL string
}
ProjectSettingsSPAVM feeds the thin-shell that hosts the project-settings SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("project-settings").
type ProviderCapVM ¶ added in v0.15.2
ProviderCapVM is the used / effective-max slot count for one provider instance, shown on its card as "<Used> / <Max>" — or "<Used> / ∞" when Unlimited (no finite cap at provider or global scope).
type ProviderChoiceVM ¶
ProviderChoiceVM is one healthy provider row — what the New Session picker offers. Disabled / unprobed / version-failed providers never reach the UI.
type ProviderSpawnDetailVM ¶
type ProviderSpawnDetailVM struct {
Layout AgentsLayoutVM
Base string
File provider.SpawnLogFile
Events []provider.SpawnEvent
// SessionDeleted is true when the spawn's session no longer exists
// (deleted since the spawn ran) — the detail page shows a notice and
// the cwd path is stale.
SessionDeleted bool
}
ProviderSpawnDetailVM holds data for one spawn-log file timeline.
type ProvidersSPAVM ¶ added in v0.19.0
type ProvidersSPAVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
}
ProvidersSPAVM feeds the thin-shell that hosts the providers SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("providers").
type RestDocsVM ¶ added in v0.10.0
type RestDocsVM struct {
Base string // wick external URL (also used for /profile/tokens link)
APIBase string // <Base>/integrations/rest/api/v1/openai — what SDK base_url points at
ChatEndpoint string // <APIBase>/chat/completions
ResponsesEndpoint string // <APIBase>/responses
ModelsEndpoint string // <APIBase>/models
}
RestDocsVM is the view model for the REST channel's docs panel.
APIBase is the SDK base_url (no trailing slash). The three endpoint fields are full URLs derived from it — handler precomputes them so the templ stays free of string concat noise.
type SessionLifecycleVM ¶
SessionLifecycleVM is the per-row lifecycle snapshot the sessions list table renders. PID + LastActiveMs feed the countdown ring; Lifecycle is the colour key.
type SettingsVM ¶ added in v0.10.0
type SettingsVM struct {
Layout AgentsLayoutVM
Base string
Rows []entity.Config
// SystemPromptCurrent is the live value of `system_prompt`.
SystemPromptCurrent string
// SystemPromptDefault is the baseline shipped with wick. Rendered as
// the target of the Reset button.
SystemPromptDefault string
}
SettingsVM is the view model for the embedded settings page.
type SkillsSPAVM ¶ added in v0.19.0
type SkillsSPAVM struct {
Layout AgentsLayoutVM
Base string
AssetURL string
}
SkillsSPAVM feeds the thin-shell that hosts the skills SPA inside the standard agents layout. AssetURL is the hashed Vite bundle path resolved at boot via spaAssetURL("skills").