app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

View Source
const LayoutDefault = LayoutZen
View Source
const MinSplitLayoutWidth = 90

Variables

This section is empty.

Functions

func ApplyDynamicPrefs

func ApplyDynamicPrefs(opts cfgpkg.Opts) cfgpkg.Opts

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

func HandleConfiguredKeybind(state *State, ev keyboard.Event, keybinds []capabilities.Keybind) bool

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

func HandleKey(state *State, ev keyboard.Event, clipboardCmd string) (handled bool, quit bool)

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 HandlePublicComponentEvent

func HandlePublicComponentEvent(state *State, ev keyboard.Event, ctx capabilities.Ctx) bool

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

Run executes the main event loop. It returns the server process (if any) so the caller can perform final cleanup.

func UserConfigGoPath

func UserConfigGoPath() (string, error)

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

func ValidBackendProvider(provider string) bool

ValidBackendProvider reports whether provider names a backend plums ships.

Types

type BackendListItem

type BackendListItem struct {
	ID      string
	Name    string
	Current bool
}

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).

func (*DynamicPrefWriter) Persist

func (w *DynamicPrefWriter) Persist(updates map[string]string) error

Persist merges the provided key→value updates into state.toml, dropping any key the config did not declare Dynamic. A no-op (no declared keys, or empty updates) skips the disk write.

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 InfoView

type InfoView int
const (
	InfoViewAI InfoView = iota
	InfoViewGitDiff
)

type InitConfigOptions

type InitConfigOptions struct {
	PlumsVersion   string
	PlumsModuleDir string
}

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 Message

type Message struct {
	Role    string
	Content string
}

type ModelListItem

type ModelListItem struct {
	ProviderID   string
	ProviderName string
	ModelID      string
	ModelName    string
	Current      bool
}

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 PaddingNode struct {
	Top    *float64 `json:"top"`
	Right  *float64 `json:"right"`
	Bottom *float64 `json:"bottom"`
	Left   *float64 `json:"left"`
}

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 SessionListItem struct {
	ID        string
	Title     string
	Directory string
	Updated   int64
	Current   bool
}

type SizeNode

type SizeNode struct {
	Width  json.RawMessage `json:"width"`
	Height json.RawMessage `json:"height"`
}

type SkillSuggestion

type SkillSuggestion struct {
	Name        string
	Description string
}

type SlashCommand

type SlashCommand struct {
	Name   string
	Detail string
	Do     func(context.Context, capabilities.Ctx) error
}

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 NewState

func NewState(width int, height int) *State

func (*State) ActiveEditorDropdownIndex

func (s *State) ActiveEditorDropdownIndex(total int) int

func (*State) AddMessage

func (s *State) AddMessage(role, content string)

AddMessage appends a message with the given role directly to the log. Use role "system" for status / error notices.

func (*State) AdjustOutputPercentage

func (s *State) AdjustOutputPercentage(delta int) bool

func (*State) AdjustSelectedPaletteItem

func (s *State) AdjustSelectedPaletteItem(delta int) bool

func (*State) AppendAiOutput

func (s *State) AppendAiOutput(b string)

func (*State) BeginPublicComponentFrame

func (s *State) BeginPublicComponentFrame()

func (*State) ChatLog

func (s *State) ChatLog() *components.ChatLog

func (*State) ClampOutputScroll

func (s *State) ClampOutputScroll(maxOffset int)

func (*State) ClearAiOutput

func (s *State) ClearAiOutput()

func (*State) ClearConversation

func (s *State) ClearConversation()

func (*State) ClearPaletteSearch

func (s *State) ClearPaletteSearch() bool

func (*State) CloseEditorDropdown

func (s *State) CloseEditorDropdown() bool

func (*State) ClosePalette

func (s *State) ClosePalette()

func (*State) ConsumeGitDiffDirty

func (s *State) ConsumeGitDiffDirty() bool

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 (s *State) ConsumeSubmittedInput() string

func (*State) ConsumeSubmittedMessage

func (s *State) ConsumeSubmittedMessage() string

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 (s *State) DeletePaletteRune() bool

func (*State) DiffLog

func (s *State) DiffLog() *components.DiffLog

func (*State) EditorDropdownOpen

func (s *State) EditorDropdownOpen() bool

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 (s *State) FinalizeAiOutput() string

func (*State) InsertPaletteRune

func (s *State) InsertPaletteRune(ch rune)

func (*State) InsertSkillMarker

func (s *State) InsertSkillMarker(skill capabilities.Skill)

func (*State) IsOutputPercentageSelected

func (s *State) IsOutputPercentageSelected() bool

func (*State) IsRunSession

func (s *State) IsRunSession(id string) bool

IsRunSession reports whether the session was created during this run.

func (*State) IsStreaming

func (s *State) IsStreaming() bool

func (*State) LayoutLabel

func (s *State) LayoutLabel() string

func (*State) LayoutScrollsOutput

func (s *State) LayoutScrollsOutput() bool

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

func (s *State) MarkRunSession(id string)

MarkRunSession records a session as created during this run.

func (*State) Messages

func (s *State) Messages() []Message

func (*State) MoveEditorDropdown

func (s *State) MoveEditorDropdown(delta int) bool

func (*State) MovePalette

func (s *State) MovePalette(delta int)

func (*State) OpenPalette

func (s *State) OpenPalette()

func (*State) OutputMouseDown

func (s *State) OutputMouseDown(x, y int) bool

func (*State) OutputMouseDrag

func (s *State) OutputMouseDrag(x, y int) bool

func (*State) OutputMouseUp

func (s *State) OutputMouseUp(x, y int) string

func (*State) OutputScroll

func (s *State) OutputScroll() int

func (*State) PaletteItems

func (s *State) PaletteItems() []components.PopupItem

func (*State) PaletteSearch

func (s *State) PaletteSearch() string

func (*State) PaletteTitle

func (s *State) PaletteTitle() string

func (*State) PublicComponentSelection

func (s *State) PublicComponentSelection() string

func (*State) ResetBackendSession

func (s *State) ResetBackendSession()

func (*State) Resize

func (s *State) Resize(w, h int)

func (*State) RunKeybindAction

func (s *State) RunKeybindAction(action string) bool

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) ScrollAt

func (s *State) ScrollAt(x, y, delta int) bool

func (*State) ScrollOutput

func (s *State) ScrollOutput(delta int) bool

func (*State) ScrollOutputBottom

func (s *State) ScrollOutputBottom() bool

func (*State) ScrollOutputPage

func (s *State) ScrollOutputPage(direction int) bool

func (*State) ScrollOutputVisible

func (s *State) ScrollOutputVisible(delta int) bool

func (*State) SelectEditorDropdownItem

func (s *State) SelectEditorDropdownItem() bool

func (*State) SelectPaletteItem

func (s *State) SelectPaletteItem()

func (*State) SelectPaletteItemWithCtx

func (s *State) SelectPaletteItemWithCtx(ctx capabilities.Ctx)

func (*State) SelectedBackendID

func (s *State) SelectedBackendID() string

func (*State) SelectedLayout

func (s *State) SelectedLayout() (LayoutType, bool)

func (*State) SelectedModel

func (s *State) SelectedModel() (providerID, modelID string)

func (*State) SelectedQuestionAnswer

func (s *State) SelectedQuestionAnswer() (string, bool)

func (*State) SelectedSessionID

func (s *State) SelectedSessionID() string

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 (s *State) SetBackendProvider(provider string)

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 (s *State) SetConversation(messages []Message)

func (*State) SetGitDiff

func (s *State) SetGitDiff(diff string)

func (*State) SetLayout

func (s *State) SetLayout(layoutType LayoutType)

func (*State) SetLayoutItems

func (s *State) SetLayoutItems()

func (*State) SetModel

func (s *State) SetModel(providerID, modelID string)

func (*State) SetModelItems

func (s *State) SetModelItems(items []ModelListItem)

func (*State) SetOutputMaxScroll

func (s *State) SetOutputMaxScroll(maxOffset int)

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 (s *State) SetServerReady(v bool)

func (*State) SetServerStarting

func (s *State) SetServerStarting(v bool)

func (*State) SetSessionID

func (s *State) SetSessionID(id string)

func (*State) SetSessionItems

func (s *State) SetSessionItems(items []SessionListItem)

func (*State) SetSessionTitle

func (s *State) SetSessionTitle(title string)

func (*State) SetSkillItems

func (s *State) SetSkillItems(items []capabilities.Skill)

func (*State) SetStreaming

func (s *State) SetStreaming(v bool)

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 (s *State) SpinnerFrame() int

func (*State) SplitLeftPercent

func (s *State) SplitLeftPercent() int

func (*State) SplitLeftWidth

func (s *State) SplitLeftWidth() int

func (*State) SplitOutputPercent

func (s *State) SplitOutputPercent() int

func (*State) SubmitExactSlashCommand

func (s *State) SubmitExactSlashCommand() bool

func (*State) SubmitInput

func (s *State) SubmitInput() string

func (*State) SubmitPrompt

func (s *State) SubmitPrompt(input string) string

func (*State) SwitchLayout

func (s *State) SwitchLayout()

func (*State) ThemeName

func (s *State) ThemeName() string

func (*State) ThinkingVisibilityLabel

func (s *State) ThinkingVisibilityLabel() string

func (*State) TickSpinner

func (s *State) TickSpinner()

func (*State) ToggleMode

func (s *State) ToggleMode()

func (*State) TogglePopup

func (s *State) TogglePopup()

func (*State) ToolCallVisibilityLabel

func (s *State) ToolCallVisibilityLabel() string

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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