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
Index ¶
- func AgentsLayout(vm AgentsLayoutVM) templ.Component
- func ApprovalModal(base string) templ.Component
- func ApprovedCommandsPanel(base, sessionID string) templ.Component
- func AskUserCard(base string) templ.Component
- func ChannelConfigPage(vm ChannelConfigVM) templ.Component
- func ChannelListPage(vm ChannelListVM) templ.Component
- func DataTableDetailPage(vm DataTableDetailVM) templ.Component
- func DataTablesPage(vm DataTablesVM) templ.Component
- func GateDisabledBanner(g GateStatusVM) templ.Component
- func NewSessionCompose(vm NewSessionComposeVM) templ.Component
- func Overview(vm OverviewVM) templ.Component
- func PresetEditor(vm PresetDetailVM) templ.Component
- func PresetsPage(vm PresetsVM) templ.Component
- func ProviderSpawnDetail(vm ProviderSpawnDetailVM) templ.Component
- func ProvidersPage(vm ProvidersVM) templ.Component
- func RestDocs(vm RestDocsVM) templ.Component
- func SessionDetail(vm SessionDetailVM) templ.Component
- func SessionsList(vm SessionsListVM) templ.Component
- func SessionsTable(vm SessionsTableVM) templ.Component
- func SettingsPage(vm SettingsVM) templ.Component
- func WorkspacesPage(vm WorkspacesVM) templ.Component
- type AgentsLayoutVM
- type ChannelConfigVM
- type ChannelListVM
- type ChannelVM
- type DataTableDetailVM
- type DataTableRow
- type DataTablesVM
- type FilterChip
- type GateStatusVM
- type MCPClientStatusVM
- type MCPStatusVM
- type NewSessionComposeVM
- type OverviewVM
- type PresetDetailVM
- type PresetsVM
- type ProviderChoiceVM
- type ProviderSpawnDetailVM
- type ProvidersVM
- type QueuedEntryVM
- type RestDocsVM
- type SessionDetailVM
- type SessionLifecycleVM
- type SessionsListVM
- type SessionsTableVM
- type SettingsVM
- type TurnEventVM
- type TurnVM
- type WorkspacesVM
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 ApprovalModal ¶
ApprovalModal renders the empty modal shell. JS populates fields from the SSE `approval_request` event payload and toggles visibility. Lives at the bottom of the page so its z-index sits above tab content + sticky composers.
Decision values match gate.Decision* constants exactly — the JS passes them straight through to POST /approve.
func ApprovedCommandsPanel ¶
ApprovedCommandsPanel renders the collapsible "Approved commands" section in session detail. Empty by default — JS hydrates it from GET /approvals snapshot on tab load and on each SSE approval_resolved that touched session/always state.
func AskUserCard ¶
AskUserCard is the empty inline card that JS hydrates when an ask_user request lands. Rendered once per session detail page; hidden by default. Lives above the composer so the user can answer without scrolling.
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 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 GateDisabledBanner ¶
func GateDisabledBanner(g GateStatusVM) templ.Component
GateDisabledBanner is the warning bar shown at the top of session pages when the parent process couldn't resolve a gate binary. Hidden when Enabled=true. Rendered above the session detail so operators see "agent will run unconstrained" without scrolling down to the providers page to figure out why.
func NewSessionCompose ¶ added in v0.13.0
func NewSessionCompose(vm NewSessionComposeVM) templ.Component
NewSessionCompose is the ChatGPT/Claude-style landing for starting a new conversation: pick provider (and optionally preset/workspace), type the first message, then submit. The HTTP handler creates the session, attaches the agent, and forwards the first message — only after the user actually sends something. No empty session is ever persisted from a stray visit.
func Overview ¶
func Overview(vm OverviewVM) templ.Component
func PresetEditor ¶
func PresetEditor(vm PresetDetailVM) templ.Component
func PresetsPage ¶
func ProviderSpawnDetail ¶
func ProviderSpawnDetail(vm ProviderSpawnDetailVM) templ.Component
ProviderSpawnDetail renders the event timeline of one spawn log file.
func ProvidersPage ¶
func ProvidersPage(vm ProvidersVM) templ.Component
ProvidersPage renders the Providers overview: per-instance status cards, pool capacity, and recent spawn logs. Static — user reloads to refresh.
func RestDocs ¶ added in v0.10.0
func RestDocs(vm RestDocsVM) templ.Component
RestDocs renders usage docs + a copyable curl sample for the REST channel.
func SessionDetail ¶
func SessionDetail(vm SessionDetailVM) templ.Component
SessionDetail renders the session detail page with tabs and composer.
func SessionsList ¶
func SessionsList(vm SessionsListVM) templ.Component
SessionsList renders the full "All chats" page with search.
func SessionsTable ¶
func SessionsTable(vm SessionsTableVM) templ.Component
SessionsTable is the reusable sessions card list. The Sessions full page renders it with paging; the Overview "Active Sessions" panel renders it without paging.
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 WorkspacesPage ¶
func WorkspacesPage(vm WorkspacesVM) templ.Component
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
// 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
}
AgentsLayoutVM carries sidebar data for the full-screen Claude-style shell.
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 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 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 NewSessionComposeVM ¶ added in v0.13.0
type NewSessionComposeVM struct {
Layout AgentsLayoutVM
Base string
Providers []ProviderChoiceVM
Presets []string
Workspaces []string
DefaultProvider string
DefaultPreset string
Message string // round-tripped on validation error
Error string
}
NewSessionComposeVM feeds the ChatGPT-style compose page that gathers provider/preset/workspace + first message before any session is persisted. The session is created server-side only when the form posts back with a non-empty message.
type OverviewVM ¶
type OverviewVM struct {
Layout AgentsLayoutVM
Base string
Active int
QueueLen int
PoolMax int
SessionIDs []string
Sessions map[string]session.Session
Lifecycle map[string]SessionLifecycleVM
IdleTimeoutMs int64
Queued []QueuedEntryVM
}
OverviewVM holds data for the Overview page. SessionIDs is the active-only subset (spawning/working/idle) — Killed sessions live in /sessions, not on the Overview. Queued is the per-session FIFO snapshot — operators can kill a queue entry that's been waiting too long.
type PresetDetailVM ¶
type PresetDetailVM struct {
Layout AgentsLayoutVM
Base string
Name string
Body string
}
PresetDetailVM holds data for the Preset editor page.
type PresetsVM ¶
type PresetsVM struct {
Layout AgentsLayoutVM
Base string
Names []string
}
PresetsVM holds data for the Presets list page.
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
}
ProviderSpawnDetailVM holds data for one spawn-log file timeline.
type ProvidersVM ¶
type ProvidersVM struct {
Layout AgentsLayoutVM
Base string
Statuses []provider.Status
Spawns []provider.SpawnLogFile
Page int
HasNext bool
PoolActive int
PoolQueueLen int
PoolMax int
SupportedKeys []string
Gate GateStatusVM
AutoRescan bool
MCP MCPStatusVM
}
ProvidersVM holds data for the Providers page — runtime instance statuses, recent spawn log files, and live pool capacity. Spawns is the current page slice; Page/HasNext drive the pager.
type QueuedEntryVM ¶
QueuedEntryVM is one row in the queue panel. WaitingMs drives a "waiting Ns" label so operators see how stale the entry is.
type RestDocsVM ¶ added in v0.10.0
type RestDocsVM struct {
Base string // wick base (for /profile/tokens link)
Endpoint string // full URL of the chat completions endpoint
SampleUser string // session key shown in samples
}
RestDocsVM is the view model for the REST channel's docs panel.
type SessionDetailVM ¶
type SessionDetailVM struct {
Layout AgentsLayoutVM
Base string
Session session.Session
Tab string // "conversation" | "commands" | "raw"
Turns []TurnVM
CmdLines []string
Lifecycle string
PID int
LastActiveMs int64
IdleTimeoutMs int64
Gate GateStatusVM
Providers []ProviderChoiceVM
ActiveProvider string
WorkspaceList []string
ActiveWorkspace string
}
SessionDetailVM holds data for the Session detail page.
Lifecycle / PID / LastActiveMs / IdleTimeoutMs feed the realtime status badge: the server emits the snapshot at render time and JS updates it from SSE events thereafter.
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 SessionsListVM ¶
type SessionsListVM struct {
Layout AgentsLayoutVM
Base string
IDs []string
Sessions map[string]session.Session
Labels map[string]string // id → first user message preview
Workspaces map[string]workspace.Workspace
WorkspaceList []string
PresetList []string
Providers []ProviderChoiceVM
Lifecycle map[string]SessionLifecycleVM
IdleTimeoutMs int64
Page int
HasNext bool
}
SessionsListVM holds data for the Sessions list page. Lifecycle is keyed by session ID so each row can render the live badge — empty means no live entry in the pool (badge falls back to "killed" / no-agent).
type SessionsTableVM ¶
type SessionsTableVM struct {
Base string
IDs []string
Sessions map[string]session.Session
Lifecycle map[string]SessionLifecycleVM
IdleTimeoutMs int64
EmptyText string
ShowPaging bool
Page int
HasNext bool
}
SessionsTableVM feeds the reusable sessions list table component. The full /sessions page sets ShowPaging=true; the Overview "Active Sessions" panel sets ShowPaging=false and uses a tighter EmptyText.
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 TurnEventVM ¶ added in v0.13.0
type TurnEventVM struct {
Type string // "tool_use" | "tool_result" | "thinking"
ToolName string
ToolInput string
ToolUseID string
IsError bool
Text string
}
TurnEventVM is one tool/thinking event within an assistant turn.
type TurnVM ¶
type TurnVM struct {
Role string // "user" | "assistant" | "system"
Agent string
Text string
Truncated bool
Time time.Time
Events []TurnEventVM
}
TurnVM is one conversation turn for the UI.
type WorkspacesVM ¶
type WorkspacesVM struct {
Layout AgentsLayoutVM
Base string
WorkspaceList []string
Workspaces map[string]workspace.Workspace
PresetList []string
}
WorkspacesVM holds data for the Workspaces page.