Documentation
¶
Index ¶
- Constants
- func ApplyDynamicPrefs(opts cfgpkg.Opts) cfgpkg.Opts
- func CreateDefaultLayout(state *State) *components.Div
- func CreateZenLayout(state *State) *components.Div
- func DefaultClipboardCommand() string
- func DefaultComponents() []capabilities.Component
- func FormatVersionMetadata(meta VersionMetadata) string
- func HandleConfiguredKeybind(state *State, ev keyboard.Event, keybinds []capabilities.Keybind) bool
- func HandleKey(state *State, ev keyboard.Event, clipboardCmd string) (handled bool, quit bool)
- func HandlePublicComponentEvent(state *State, ev keyboard.Event, ctx capabilities.Ctx) bool
- func InitGlobalConfig(opts ...InitConfigOptions) (string, error)
- func NewChatOutputComponent() capabilities.Component
- func NewCommandPalettePanelComponent() capabilities.Component
- func NewDiffLogComponent() capabilities.Component
- func NewEditorComponent() capabilities.Component
- func NewEditorOrPaletteComponent() capabilities.Component
- func NewInfoTabsComponent() capabilities.Component
- func NewInfoViewComponent() capabilities.Component
- func NewInputBoxComponent() capabilities.Component
- func NewSessionsComponent() capabilities.Component
- func NewSessionsHorizontalComponent() capabilities.Component
- func NewSessionsVerticalComponent() capabilities.Component
- func NewSplitStatusBarComponent() capabilities.Component
- func NewStatusBarComponent() capabilities.Component
- func NewStatusSeparatorComponent() capabilities.Component
- func NewTextBoxComponent() capabilities.Component
- func NewVerticalStatusSeparatorComponent() capabilities.Component
- func PublicLayoutSelectable(public capabilities.Layout) bool
- func Render(state *State, cfg *RenderConfig)
- func Run(ctx context.Context, deps Deps, cfg RunConfig) (capabilities.ServerProcess, error)
- func UserConfigGoPath() (string, error)
- func ValidBackendProvider(provider string) bool
- type BackendListItem
- type BackendRuntime
- type ComponentFactory
- type Deps
- type DynamicPrefWriter
- type FileCommandSuggestion
- type Hooks
- type InfoView
- type InitConfigOptions
- type LayoutNode
- type LayoutType
- type Message
- type ModelListItem
- type OverlayNode
- type OverlayWidthNode
- type PaddingNode
- type PaletteView
- type RenderConfig
- type RunConfig
- type SessionListItem
- type SizeNode
- type SkillSuggestion
- type SlashCommand
- type StartupResult
- type State
- func (s *State) ActiveEditorDropdownIndex(total int) int
- func (s *State) AddMessage(role, content string)
- func (s *State) AdjustOutputPercentage(delta int) bool
- func (s *State) AdjustSelectedPaletteItem(delta int) bool
- func (s *State) AppendAiOutput(b string)
- func (s *State) BeginPublicComponentFrame()
- func (s *State) ChatLog() *components.ChatLog
- func (s *State) ClampOutputScroll(maxOffset int)
- func (s *State) ClearAiOutput()
- func (s *State) ClearConversation()
- func (s *State) ClearPaletteSearch() bool
- func (s *State) CloseEditorDropdown() bool
- func (s *State) ClosePalette()
- func (s *State) ConsumeGitDiffDirty() bool
- func (s *State) ConsumePendingCommand() (capabilities.Command, bool)
- func (s *State) ConsumePendingListPick() (capabilities.ListItem, func(capabilities.ListItem), bool)
- func (s *State) ConsumeSubmittedInput() string
- func (s *State) ConsumeSubmittedMessage() string
- func (s *State) CycleInfoView()
- func (s *State) CycleThinkingVisibility()
- func (s *State) CycleToolCallVisibility()
- func (s *State) DeletePaletteRune() bool
- func (s *State) DiffLog() *components.DiffLog
- func (s *State) EditorDropdownOpen() bool
- func (s *State) EffectiveLayout() LayoutType
- func (s *State) EffectiveTheme() capabilities.Theme
- func (s *State) FileCommandSuggestions() []FileCommandSuggestion
- func (s *State) FinalizeAiOutput() string
- func (s *State) InsertPaletteRune(ch rune)
- func (s *State) InsertSkillMarker(skill capabilities.Skill)
- func (s *State) IsOutputPercentageSelected() bool
- func (s *State) IsRunSession(id string) bool
- func (s *State) IsStreaming() bool
- func (s *State) LayoutLabel() string
- func (s *State) LayoutScrollsOutput() bool
- func (s *State) MarkGitDiffDirty()
- func (s *State) MarkRunSession(id string)
- func (s *State) Messages() []Message
- func (s *State) MoveEditorDropdown(delta int) bool
- func (s *State) MovePalette(delta int)
- func (s *State) OpenPalette()
- func (s *State) OutputMouseDown(x, y int) bool
- func (s *State) OutputMouseDrag(x, y int) bool
- func (s *State) OutputMouseUp(x, y int) string
- func (s *State) OutputScroll() int
- func (s *State) PaletteItems() []components.PopupItem
- func (s *State) PaletteSearch() string
- func (s *State) PaletteTitle() string
- func (s *State) PublicComponentSelection() string
- func (s *State) ResetBackendSession()
- func (s *State) Resize(w, h int)
- func (s *State) RunKeybindAction(action string) bool
- func (s *State) ScrollAt(x, y, delta int) bool
- func (s *State) ScrollOutput(delta int) bool
- func (s *State) ScrollOutputBottom() bool
- func (s *State) ScrollOutputPage(direction int) bool
- func (s *State) ScrollOutputVisible(delta int) bool
- func (s *State) SelectEditorDropdownItem() bool
- func (s *State) SelectPaletteItem()
- func (s *State) SelectPaletteItemWithCtx(ctx capabilities.Ctx)
- func (s *State) SelectedBackendID() string
- func (s *State) SelectedLayout() (LayoutType, bool)
- func (s *State) SelectedModel() (providerID, modelID string)
- func (s *State) SelectedQuestionAnswer() (string, bool)
- func (s *State) SelectedSessionID() string
- func (s *State) SelectedSkill() (capabilities.Skill, bool)
- func (s *State) SessionMouseDown(ctx capabilities.Ctx, x, y int) bool
- func (s *State) Sessions() *components.Sessions
- func (s *State) SessionsHorizontal() *components.Sessions
- func (s *State) SetAvailableBackends(items []BackendListItem)
- func (s *State) SetAvailableLayouts(layouts []LayoutType)
- func (s *State) SetAvailableSkills(items []capabilities.Skill)
- func (s *State) SetBackendItems(items []BackendListItem)
- func (s *State) SetBackendProvider(provider string)
- func (s *State) SetCommands(commands []capabilities.Command)
- func (s *State) SetComponentFactories(factories map[string]ComponentFactory)
- func (s *State) SetConversation(messages []Message)
- func (s *State) SetGitDiff(diff string)
- func (s *State) SetLayout(layoutType LayoutType)
- func (s *State) SetLayoutItems()
- func (s *State) SetModel(providerID, modelID string)
- func (s *State) SetModelItems(items []ModelListItem)
- func (s *State) SetOutputMaxScroll(maxOffset int)
- func (s *State) SetQuestionItems(title string, items []capabilities.QuestionOption)
- func (s *State) SetRuntimeList(title string, items []capabilities.ListItem, ...)
- func (s *State) SetServerReady(v bool)
- func (s *State) SetServerStarting(v bool)
- func (s *State) SetSessionID(id string)
- func (s *State) SetSessionItems(items []SessionListItem)
- func (s *State) SetSessionTitle(title string)
- func (s *State) SetSkillItems(items []capabilities.Skill)
- func (s *State) SetStreaming(v bool)
- func (s *State) SetTheme(value capabilities.Theme)
- func (s *State) ShowEditorDropdown()
- func (s *State) SkillSuggestions() []SkillSuggestion
- func (s *State) SlashCommands() []SlashCommand
- func (s *State) SpinnerFrame() int
- func (s *State) SplitLeftPercent() int
- func (s *State) SplitLeftWidth() int
- func (s *State) SplitOutputPercent() int
- func (s *State) SubmitExactSlashCommand() bool
- func (s *State) SubmitInput() string
- func (s *State) SubmitPrompt(input string) string
- func (s *State) SwitchLayout()
- func (s *State) ThemeName() string
- func (s *State) ThinkingVisibilityLabel() string
- func (s *State) TickSpinner()
- func (s *State) ToggleMode()
- func (s *State) TogglePopup()
- func (s *State) ToolCallVisibilityLabel() string
- type StyleNode
- type VersionMetadata
Constants ¶
const LayoutDefault = LayoutZen
const MinSplitLayoutWidth = 90
Variables ¶
This section is empty.
Functions ¶
func ApplyDynamicPrefs ¶
ApplyDynamicPrefs resolves every Opts field declared cfg.Dynamic to its remembered value from the state.toml store. Fields that are not Dynamic are left untouched (a pinned literal or unset stays as-is). When the store has no value for a Dynamic field, the field is left Dynamic so ToSettings falls back to the Default Config value. Only Dynamic fields are ever touched.
func CreateDefaultLayout ¶
func CreateDefaultLayout(state *State) *components.Div
func CreateZenLayout ¶
func CreateZenLayout(state *State) *components.Div
CreateZenLayout is the Go fallback for the minimalistic "zen" layout: a single neutral-grey column with the chat output above a roomy input box and no sidebar, separators, or tabs.
func DefaultClipboardCommand ¶
func DefaultClipboardCommand() string
DefaultClipboardCommand returns the default clipboard copy command for the current platform.
func DefaultComponents ¶
func DefaultComponents() []capabilities.Component
DefaultComponents returns the built-in public components. Every entry is a capabilities.Component that renders through Surface from RenderCtx; there is no privileged *State factory path. State-entangled panes (editor, sessions, info_view, ...) render a State-owned widget via the in-package appStateProvider seam so central key/mouse/scroll routing keeps targeting the same instance.
func FormatVersionMetadata ¶
func FormatVersionMetadata(meta VersionMetadata) string
FormatVersionMetadata renders metadata as a human-readable string.
func HandleConfiguredKeybind ¶
HandleConfiguredKeybind overlays user-owned keybindings on top of the legacy defaults. A matching key is consumed even if the configured action is invalid, so an overridden default does not leak through.
func HandleKey ¶
HandleKey processes a single keyboard event and updates state. It returns handled=true when the event was consumed, and quit=true when the application should exit.
func InitGlobalConfig ¶
func InitGlobalConfig(opts ...InitConfigOptions) (string, error)
InitGlobalConfig creates the default config files in ~/.config/plums/config.
func NewChatOutputComponent ¶
func NewChatOutputComponent() capabilities.Component
NewChatOutputComponent returns the registry template. The kernel instantiates one per layout slot via NewComponent so each owns private interaction state.
func NewCommandPalettePanelComponent ¶
func NewCommandPalettePanelComponent() capabilities.Component
func NewDiffLogComponent ¶
func NewDiffLogComponent() capabilities.Component
func NewEditorComponent ¶
func NewEditorComponent() capabilities.Component
func NewEditorOrPaletteComponent ¶
func NewEditorOrPaletteComponent() capabilities.Component
func NewInfoTabsComponent ¶
func NewInfoTabsComponent() capabilities.Component
func NewInfoViewComponent ¶
func NewInfoViewComponent() capabilities.Component
func NewInputBoxComponent ¶
func NewInputBoxComponent() capabilities.Component
func NewSessionsComponent ¶
func NewSessionsComponent() capabilities.Component
func NewSessionsHorizontalComponent ¶
func NewSessionsHorizontalComponent() capabilities.Component
func NewSessionsVerticalComponent ¶
func NewSessionsVerticalComponent() capabilities.Component
func NewSplitStatusBarComponent ¶
func NewSplitStatusBarComponent() capabilities.Component
func NewStatusBarComponent ¶
func NewStatusBarComponent() capabilities.Component
func NewStatusSeparatorComponent ¶
func NewStatusSeparatorComponent() capabilities.Component
func NewTextBoxComponent ¶
func NewTextBoxComponent() capabilities.Component
func NewVerticalStatusSeparatorComponent ¶
func NewVerticalStatusSeparatorComponent() capabilities.Component
func PublicLayoutSelectable ¶
func PublicLayoutSelectable(public capabilities.Layout) bool
func Render ¶
func Render(state *State, cfg *RenderConfig)
func Run ¶
func Run(ctx context.Context, deps Deps, cfg RunConfig) (capabilities.ServerProcess, error)
Run executes the main event loop. It returns the server process (if any) so the caller can perform final cleanup.
func UserConfigGoPath ¶
UserConfigGoPath returns the path of the compiled user config source, ~/.config/plums/config/config.go. This is the only user-facing authoring surface; auto-build compiles it into the running binary.
func ValidBackendProvider ¶
ValidBackendProvider reports whether provider names a backend plums ships.
Types ¶
type BackendListItem ¶
type BackendRuntime ¶
type BackendRuntime struct {
ID string
Name string
Backend capabilities.Backend
Startup func(ctx context.Context, backend capabilities.Backend) (*capabilities.StartupResult, error)
}
BackendRuntime describes one selectable application backend.
func BackendRuntimesFromRegistrations ¶
func BackendRuntimesFromRegistrations(registrations []capabilities.BackendRegistration) []BackendRuntime
type ComponentFactory ¶
type ComponentFactory func(*State, LayoutNode) (layout.Component, error)
ComponentFactory builds a layout.Component for a layout slot. Every factory is produced by ComponentFactoryForPublic, wrapping a public capabilities.Component — there is no privileged *State factory path.
func ComponentFactoryForPublic ¶
func ComponentFactoryForPublic(component capabilities.Component) ComponentFactory
type Deps ¶
type Deps struct {
Terminal *ui.Terminal
Keyboard <-chan keyboard.Event
Backend capabilities.Backend
Startup func(ctx context.Context, backend capabilities.Backend) (*capabilities.StartupResult, error)
Backends []BackendRuntime
RenderConfig *RenderConfig
Layouts []LayoutType
Commands []capabilities.Command
Keybinds []capabilities.Keybind
Components map[string]ComponentFactory
Hooks Hooks
Registry *core.AgentRegistry
Skills capabilities.SkillProvider
GitDiff capabilities.GitDiffProvider
Question capabilities.QuestionProvider
// CompletionSources are the completion sources plugins contributed at Init via
// Host.Services().Completion(). Core prepends its built-in @file/slash sources
// when building the runtime completion registry.
CompletionSources []capabilities.CompletionSource
}
Deps bundles all wired dependencies needed by the event loop.
type DynamicPrefWriter ¶
type DynamicPrefWriter struct {
// contains filtered or unexported fields
}
DynamicPrefWriter persists runtime preference changes back to state.toml, but only for fields the config declared cfg.Dynamic. Non-Dynamic fields are pinned by the user and never overwritten by runtime changes.
func NewDynamicPrefWriter ¶
func NewDynamicPrefWriter(opts cfgpkg.Opts) *DynamicPrefWriter
NewDynamicPrefWriter builds a writer from the resolved Opts: a field is persistable only when it was declared Dynamic (Pref/Count) or, for HideThinking, left unset so the runtime value is what's remembered.
func (*DynamicPrefWriter) Declares ¶
func (w *DynamicPrefWriter) Declares(key string) bool
Declares reports whether key is persistable (declared Dynamic by the config).
type FileCommandSuggestion ¶
type FileCommandSuggestion struct {
Path string
}
type Hooks ¶
type Hooks struct {
OnMessage []capabilities.OnMessage
OnSessionStart []capabilities.OnSessionStart
OnToolCall []capabilities.OnToolCall
OnShutdown []capabilities.OnShutdown
}
type InitConfigOptions ¶
type LayoutNode ¶
type LayoutNode struct {
Type string `json:"type"`
Component string `json:"component"`
Size SizeNode `json:"size"`
Direction string `json:"direction"`
AlignItems string `json:"align_items"`
MinWidth string `json:"min_width"`
Fallback string `json:"fallback"`
Padding PaddingNode `json:"padding"`
Style StyleNode `json:"style"`
Children []LayoutNode `json:"children"`
WhenPopupOpen *LayoutNode `json:"when_popup_open"`
Variants map[string]string `json:"variants"`
// contains filtered or unexported fields
}
func LayoutNodeFromPublic ¶
func LayoutNodeFromPublic(node capabilities.Node) (LayoutNode, error)
type LayoutType ¶
type LayoutType string
LayoutType is the identifier of a layout — the same string used as its key in the render config's "layouts" map. New layouts are added by registered layout plugins; no Go constant is required. The named constants below exist only for stock/runtime-recognised layouts that carry interaction behaviour.
const ( LayoutSplit LayoutType = "split" // LayoutZen is the built-in minimalistic single-column layout in neutral // greys. It needs no special Go behaviour — it's named only so the Go // fallback builder and default cycle can reference it. LayoutZen LayoutType = "zen" )
func InstallPublicLayout ¶
func InstallPublicLayout(cfg *RenderConfig, public capabilities.Layout) (LayoutType, error)
func LayoutTypeFromString ¶
func LayoutTypeFromString(name string) LayoutType
LayoutTypeFromString parses a layout name into a LayoutType. Any non-empty name is a valid id (validity against the config is enforced where layouts are listed); an empty name falls back to the default.
type ModelListItem ¶
type OverlayNode ¶
type OverlayNode struct {
EnabledWhen string `json:"enabled_when"`
Width OverlayWidthNode `json:"width"`
Style StyleNode `json:"style"`
}
type OverlayWidthNode ¶
type OverlayWidthNode struct {
Preferred int `json:"preferred"`
Min int `json:"min"`
Max json.RawMessage `json:"max"`
}
type PaddingNode ¶
type PaletteView ¶
type PaletteView int
const ( PaletteViewCommands PaletteView = iota PaletteViewModels PaletteViewSessions PaletteViewSkills PaletteViewQuestions PaletteViewBackends PaletteViewLayouts PaletteViewList )
type RenderConfig ¶
type RenderConfig struct {
Version int `json:"version"`
Layouts map[string]LayoutNode `json:"layouts"`
// Menu is the ordered list of user-selectable layout ids (the ones the
// layout cycle and palette offer). It is the data-driven knob for adding a
// layout: define it under "layouts" and list its key here. When empty, the
// legacy split/zen keys are recognised for backwards compatibility.
Menu []string `json:"menu"`
Overlays map[string]OverlayNode `json:"overlays"`
}
func NewRenderConfig ¶
func NewRenderConfig() *RenderConfig
NewRenderConfig returns an internal render-config scaffold: an empty layout set plus the fixed overlay definitions (the slash-command dropdown and command palette popup). Layouts and the menu are populated at startup by InstallPublicLayout from the registered layout plugins — there is no user-authored layout data file. The overlays are app-internal chrome, not a user-authored layout, so they live here as Go values rather than a file.
func (*RenderConfig) AvailableLayoutTypes ¶
func (cfg *RenderConfig) AvailableLayoutTypes() []LayoutType
type RunConfig ¶
type RunConfig struct {
BackendProvider string
ClipboardCommand string
SpinnerInterval time.Duration
HealthTimeout time.Duration
QuestionReplyTimeout time.Duration
RecentModelTimeout time.Duration
ListTimeout time.Duration
WorkingDirectory string
// DynamicPrefs is the resolved Opts; it tells the runtime which fields were
// declared cfg.Dynamic and so should be persisted to state.toml on change.
DynamicPrefs cfgpkg.Opts
DefaultLayout string
// Mode is the initial agent mode (e.g. "build"/"plan"); empty keeps the state
// default.
Mode string
// Model is the initial model, "providerID/modelID" or a bare modelID; empty
// defers to the backend's recent model.
Model string
Theme capabilities.Theme
HideThinking bool
ThinkingVisibility int
ToolCallVisibility int
SplitLeftWidth int
// ClearHistory hides backend sessions that were not created in this run.
ClearHistory bool
}
RunConfig holds timing and behaviour overrides for the event loop.
type SessionListItem ¶
type SizeNode ¶
type SizeNode struct {
Width json.RawMessage `json:"width"`
Height json.RawMessage `json:"height"`
}
type SkillSuggestion ¶
type SlashCommand ¶
type StartupResult ¶
type StartupResult struct {
BackendID string
Session *capabilities.Session
Server capabilities.ServerProcess
Err error
}
StartupResult is delivered on the startup channel once the backend is ready.
type State ¶
type State struct {
Editor *components.Editor
Layout LayoutType
SessionID string
SessionTitle string
ServerStarting bool
ServerReady bool
PopupOpen bool
PaletteIndex int
DropdownIndex int
DropdownHidden bool
PaletteView PaletteView
PaletteQuery string
ModelItems []ModelListItem
SessionItems []SessionListItem
SkillItems []capabilities.Skill
QuestionTitle string
QuestionItems []capabilities.QuestionOption
BackendItems []BackendListItem
ListTitle string
ListItems []capabilities.ListItem
BackendProvider string
Mode string
Theme capabilities.Theme
ThinkingMode components.ThinkingVisibility
ToolCallMode components.ToolCallVisibility
ModelProvider string
ModelID string
InfoView InfoView
GitDiff string
OutputPercent int
// contains filtered or unexported fields
}
func (*State) ActiveEditorDropdownIndex ¶
func (*State) AddMessage ¶
AddMessage appends a message with the given role directly to the log. Use role "system" for status / error notices.
func (*State) AdjustOutputPercentage ¶
func (*State) AdjustSelectedPaletteItem ¶
func (*State) AppendAiOutput ¶
func (*State) BeginPublicComponentFrame ¶
func (s *State) BeginPublicComponentFrame()
func (*State) ChatLog ¶
func (s *State) ChatLog() *components.ChatLog
func (*State) ClampOutputScroll ¶
func (*State) ClearAiOutput ¶
func (s *State) ClearAiOutput()
func (*State) ClearConversation ¶
func (s *State) ClearConversation()
func (*State) ClearPaletteSearch ¶
func (*State) CloseEditorDropdown ¶
func (*State) ClosePalette ¶
func (s *State) ClosePalette()
func (*State) ConsumeGitDiffDirty ¶
func (*State) ConsumePendingCommand ¶
func (s *State) ConsumePendingCommand() (capabilities.Command, bool)
func (*State) ConsumePendingListPick ¶
func (s *State) ConsumePendingListPick() (capabilities.ListItem, func(capabilities.ListItem), bool)
func (*State) ConsumeSubmittedInput ¶
func (*State) ConsumeSubmittedMessage ¶
func (*State) CycleInfoView ¶
func (s *State) CycleInfoView()
func (*State) CycleThinkingVisibility ¶
func (s *State) CycleThinkingVisibility()
func (*State) CycleToolCallVisibility ¶
func (s *State) CycleToolCallVisibility()
func (*State) DeletePaletteRune ¶
func (*State) DiffLog ¶
func (s *State) DiffLog() *components.DiffLog
func (*State) EditorDropdownOpen ¶
func (*State) EffectiveLayout ¶
func (s *State) EffectiveLayout() LayoutType
func (*State) EffectiveTheme ¶
func (s *State) EffectiveTheme() capabilities.Theme
func (*State) FileCommandSuggestions ¶
func (s *State) FileCommandSuggestions() []FileCommandSuggestion
func (*State) FinalizeAiOutput ¶
func (*State) InsertPaletteRune ¶
func (*State) InsertSkillMarker ¶
func (s *State) InsertSkillMarker(skill capabilities.Skill)
func (*State) IsOutputPercentageSelected ¶
func (*State) IsRunSession ¶
IsRunSession reports whether the session was created during this run.
func (*State) IsStreaming ¶
func (*State) LayoutLabel ¶
func (*State) LayoutScrollsOutput ¶
LayoutScrollsOutput reports whether vertical scroll keys (PageUp/Down and the mouse wheel) should move the chat output rather than the editor. True for simple single-column layouts — zen and any custom layout that is not split.
func (*State) MarkGitDiffDirty ¶
func (s *State) MarkGitDiffDirty()
func (*State) MarkRunSession ¶
MarkRunSession records a session as created during this run.
func (*State) MoveEditorDropdown ¶
func (*State) MovePalette ¶
func (*State) OpenPalette ¶
func (s *State) OpenPalette()
func (*State) OutputMouseDown ¶
func (*State) OutputMouseDrag ¶
func (*State) OutputMouseUp ¶
func (*State) OutputScroll ¶
func (*State) PaletteItems ¶
func (s *State) PaletteItems() []components.PopupItem
func (*State) PaletteSearch ¶
func (*State) PaletteTitle ¶
func (*State) PublicComponentSelection ¶
func (*State) ResetBackendSession ¶
func (s *State) ResetBackendSession()
func (*State) RunKeybindAction ¶
RunKeybindAction resolves a keybind's Do string against the registered commands. Exact command names win first ("palette.open", "prompt.submit", "/new"). Legacy action keywords ("open_palette", "change_model", ...) map to the equivalent registered command or slash command so existing keymaps keep working. The bare "open_palette" still opens the palette directly when no command registry is installed, which keeps low-level state tests usable.
func (*State) ScrollOutput ¶
func (*State) ScrollOutputBottom ¶
func (*State) ScrollOutputPage ¶
func (*State) ScrollOutputVisible ¶
func (*State) SelectEditorDropdownItem ¶
func (*State) SelectPaletteItem ¶
func (s *State) SelectPaletteItem()
func (*State) SelectPaletteItemWithCtx ¶
func (s *State) SelectPaletteItemWithCtx(ctx capabilities.Ctx)
func (*State) SelectedBackendID ¶
func (*State) SelectedLayout ¶
func (s *State) SelectedLayout() (LayoutType, bool)
func (*State) SelectedModel ¶
func (*State) SelectedQuestionAnswer ¶
func (*State) SelectedSessionID ¶
func (*State) SelectedSkill ¶
func (s *State) SelectedSkill() (capabilities.Skill, bool)
func (*State) SessionMouseDown ¶
func (s *State) SessionMouseDown(ctx capabilities.Ctx, x, y int) bool
func (*State) Sessions ¶
func (s *State) Sessions() *components.Sessions
func (*State) SessionsHorizontal ¶
func (s *State) SessionsHorizontal() *components.Sessions
func (*State) SetAvailableBackends ¶
func (s *State) SetAvailableBackends(items []BackendListItem)
func (*State) SetAvailableLayouts ¶
func (s *State) SetAvailableLayouts(layouts []LayoutType)
func (*State) SetAvailableSkills ¶
func (s *State) SetAvailableSkills(items []capabilities.Skill)
func (*State) SetBackendItems ¶
func (s *State) SetBackendItems(items []BackendListItem)
func (*State) SetBackendProvider ¶
func (*State) SetCommands ¶
func (s *State) SetCommands(commands []capabilities.Command)
func (*State) SetComponentFactories ¶
func (s *State) SetComponentFactories(factories map[string]ComponentFactory)
func (*State) SetConversation ¶
func (*State) SetGitDiff ¶
func (*State) SetLayout ¶
func (s *State) SetLayout(layoutType LayoutType)
func (*State) SetLayoutItems ¶
func (s *State) SetLayoutItems()
func (*State) SetModelItems ¶
func (s *State) SetModelItems(items []ModelListItem)
func (*State) SetOutputMaxScroll ¶
func (*State) SetQuestionItems ¶
func (s *State) SetQuestionItems(title string, items []capabilities.QuestionOption)
func (*State) SetRuntimeList ¶
func (s *State) SetRuntimeList(title string, items []capabilities.ListItem, onPick func(capabilities.ListItem))
func (*State) SetServerReady ¶
func (*State) SetServerStarting ¶
func (*State) SetSessionID ¶
func (*State) SetSessionItems ¶
func (s *State) SetSessionItems(items []SessionListItem)
func (*State) SetSessionTitle ¶
func (*State) SetSkillItems ¶
func (s *State) SetSkillItems(items []capabilities.Skill)
func (*State) SetStreaming ¶
func (*State) SetTheme ¶
func (s *State) SetTheme(value capabilities.Theme)
func (*State) ShowEditorDropdown ¶
func (s *State) ShowEditorDropdown()
func (*State) SkillSuggestions ¶
func (s *State) SkillSuggestions() []SkillSuggestion
func (*State) SlashCommands ¶
func (s *State) SlashCommands() []SlashCommand
func (*State) SpinnerFrame ¶
func (*State) SplitLeftPercent ¶
func (*State) SplitLeftWidth ¶
func (*State) SplitOutputPercent ¶
func (*State) SubmitExactSlashCommand ¶
func (*State) SubmitInput ¶
func (*State) SubmitPrompt ¶
func (*State) SwitchLayout ¶
func (s *State) SwitchLayout()
func (*State) ThinkingVisibilityLabel ¶
func (*State) TickSpinner ¶
func (s *State) TickSpinner()
func (*State) ToggleMode ¶
func (s *State) ToggleMode()
func (*State) TogglePopup ¶
func (s *State) TogglePopup()
func (*State) ToolCallVisibilityLabel ¶
type StyleNode ¶
type StyleNode struct {
Background []uint8 `json:"background"`
Foreground []uint8 `json:"foreground"`
Muted []uint8 `json:"muted"`
Accent []uint8 `json:"accent"`
BackgroundToken string `json:"background_token"`
ForegroundToken string `json:"foreground_token"`
MutedToken string `json:"muted_token"`
AccentToken string `json:"accent_token"`
}
type VersionMetadata ¶
type VersionMetadata struct {
Version string
Commit string
BuildDate string
GoVersion string
Modified bool
}
VersionMetadata holds build-time version information.
func LoadVersionMetadata ¶
func LoadVersionMetadata(version, commit, buildDate string) VersionMetadata
LoadVersionMetadata populates version metadata from build info and the supplied ldflag values.
Source Files
¶
- backend_caps.go
- backend_runtime.go
- clipboard.go
- completion_triggers.go
- component_chat_output.go
- component_difflog.go
- component_editor.go
- component_editor_or_palette.go
- component_helpers.go
- component_info_tabs.go
- component_info_view.go
- component_input_box.go
- component_key_handlers.go
- component_palette_panel.go
- component_registry.go
- component_separator.go
- component_sessions.go
- component_status_bar.go
- config.go
- default_components.go
- hooks.go
- keybinds.go
- keyboard.go
- palette.go
- prefs.go
- public_component.go
- public_layout.go
- question.go
- render.go
- render_config.go
- render_dropdowns.go
- render_layouts.go
- run.go
- runtime_ctx.go
- services.go
- session.go
- state.go
- state_editor.go
- state_layout.go
- state_palette.go
- state_scroll.go
- stream.go
- version.go