Documentation
¶
Overview ¶
Package settings implements the lango settings command.
Index ¶
- Constants
- Variables
- func FetchEmbeddingModelOptions(providerID string, cfg *config.Config, currentModel string) []string
- func FetchEmbeddingModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
- func FetchModelOptions(providerID string, cfg *config.Config, currentModel string) []string
- func FetchModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
- func FetchModelOptionsWithError(providerID string, cfg *config.Config, currentModel string) ([]string, error)
- func NewA2AForm(cfg *config.Config) *tuicore.FormModel
- func NewAgentForm(cfg *config.Config) *tuicore.FormModel
- func NewAgentMemoryForm(cfg *config.Config) *tuicore.FormModel
- func NewAlertingForm(cfg *config.Config) *tuicore.FormModel
- func NewAutoAdjustForm(cfg *config.Config) *tuicore.FormModel
- func NewBackgroundForm(cfg *config.Config) *tuicore.FormModel
- func NewChannelsForm(cfg *config.Config) *tuicore.FormModel
- func NewCommand() *cobra.Command
- func NewContextBudgetForm(cfg *config.Config) *tuicore.FormModel
- func NewContextProfileForm(cfg *config.Config) *tuicore.FormModel
- func NewCronForm(cfg *config.Config) *tuicore.FormModel
- func NewDBEncryptionForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyEscrowForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyEscrowOnChainForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyNegotiationForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyPricingForm(cfg *config.Config) *tuicore.FormModel
- func NewEconomyRiskForm(cfg *config.Config) *tuicore.FormModel
- func NewEmbeddingForm(cfg *config.Config) *tuicore.FormModel
- func NewGatekeeperForm(cfg *config.Config) *tuicore.FormModel
- func NewGraphForm(cfg *config.Config) *tuicore.FormModel
- func NewHooksForm(cfg *config.Config) *tuicore.FormModel
- func NewKMSForm(cfg *config.Config) *tuicore.FormModel
- func NewKnowledgeForm(cfg *config.Config) *tuicore.FormModel
- func NewLibrarianForm(cfg *config.Config) *tuicore.FormModel
- func NewLoggingForm(cfg *config.Config) *tuicore.FormModel
- func NewMCPForm(cfg *config.Config) *tuicore.FormModel
- func NewMCPServerForm(name string, srv config.MCPServerConfig) *tuicore.FormModel
- func NewMultiAgentForm(cfg *config.Config) *tuicore.FormModel
- func NewOIDCProviderForm(id string, cfg config.OIDCProviderConfig) *tuicore.FormModel
- func NewOSSandboxForm(cfg *config.Config) *tuicore.FormModel
- func NewObservabilityForm(cfg *config.Config) *tuicore.FormModel
- func NewObservationalMemoryForm(cfg *config.Config) *tuicore.FormModel
- func NewOntologyForm(cfg *config.Config) *tuicore.FormModel
- func NewOutputManagerForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PForm(cfg *config.Config) *tuicore.FormModel
- func NewP2POwnerProtectionForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PPricingForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PSandboxForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PWorkspaceForm(cfg *config.Config) *tuicore.FormModel
- func NewP2PZKPForm(cfg *config.Config) *tuicore.FormModel
- func NewPaymentForm(cfg *config.Config) *tuicore.FormModel
- func NewProvenanceForm(cfg *config.Config) *tuicore.FormModel
- func NewProviderForm(id string, cfg config.ProviderConfig) *tuicore.FormModel
- func NewProviderFromConfig(id string, pCfg config.ProviderConfig) provider.Provider
- func NewRetrievalForm(cfg *config.Config) *tuicore.FormModel
- func NewRunLedgerForm(cfg *config.Config) *tuicore.FormModel
- func NewSecurityForm(cfg *config.Config) *tuicore.FormModel
- func NewServerForm(cfg *config.Config) *tuicore.FormModel
- func NewSessionForm(cfg *config.Config) *tuicore.FormModel
- func NewSkillForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountModulesForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountPaymasterForm(cfg *config.Config) *tuicore.FormModel
- func NewSmartAccountSessionForm(cfg *config.Config) *tuicore.FormModel
- func NewToolsForm(cfg *config.Config) *tuicore.FormModel
- func NewWorkflowForm(cfg *config.Config) *tuicore.FormModel
- func ParseCustomPatterns(val string) map[string]string
- type AuthProviderItem
- type AuthProvidersListModel
- type Category
- type DepResult
- type DepStatus
- type Dependency
- type DependencyIndex
- func (idx *DependencyIndex) AllTransitiveUnmet(categoryID string, cfg *config.Config) []DepResult
- func (idx *DependencyIndex) Dependents(categoryID string) []string
- func (idx *DependencyIndex) Evaluate(categoryID string, cfg *config.Config) []DepResult
- func (idx *DependencyIndex) HasDependencies(categoryID string) bool
- func (idx *DependencyIndex) UnmetRequired(categoryID string, cfg *config.Config) int
- type DependencyPanel
- func (p *DependencyPanel) MoveDown()
- func (p *DependencyPanel) MoveUp()
- func (p *DependencyPanel) SelectedCategoryID() string
- func (p *DependencyPanel) SelectedIsUnmet() bool
- func (p *DependencyPanel) StatusSummary() string
- func (p *DependencyPanel) UnmetCount() int
- func (p *DependencyPanel) View() string
- type Editor
- type EditorStep
- type MCPServerItem
- type MCPServersListModel
- type MenuModel
- func (m MenuModel) ActiveSectionTitle() string
- func (m MenuModel) AllCategories() []Category
- func (m MenuModel) InCategoryLevel() bool
- func (m MenuModel) Init() tea.Cmd
- func (m MenuModel) IsSearching() bool
- func (m MenuModel) ShowAdvanced() bool
- func (m MenuModel) Update(msg tea.Msg) (MenuModel, tea.Cmd)
- func (m MenuModel) View() string
- type OnSaveFunc
- type ProviderItem
- type ProvidersListModel
- type Section
- type SetupFlow
- type SetupFlowState
- type SetupStep
Constants ¶
const ( TierBasic = 0 TierAdvanced = 1 )
Tier constants for category visibility.
Variables ¶
var ExperimentalCategories = map[string]bool{ "economy": true, "economy_risk": true, "economy_negotiation": true, "economy_pricing": true, "economy_escrow": true, "economy_escrow_onchain": true, "smartaccount": true, "smartaccount_session": true, "smartaccount_paymaster": true, "smartaccount_modules": true, "p2p": true, "p2p_workspace": true, "p2p_zkp": true, "p2p_pricing": true, "p2p_owner": true, "p2p_sandbox": true, "ontology": true, "a2a": true, "multi_agent": true, "runledger": true, "provenance": true, "graph": true, "os_sandbox": true, "observability": true, "alerting": true, "hooks": true, "agent_memory": true, "librarian": true, }
ExperimentalCategories lists settings category IDs for features with Experimental stability status. Used by the menu badge renderer and the @experimental search filter. Source of truth for TUI display; feature-level maturity is documented in docs/features/index.md.
Functions ¶
func FetchEmbeddingModelOptions ¶
func FetchEmbeddingModelOptions(providerID string, cfg *config.Config, currentModel string) []string
FetchEmbeddingModelOptions fetches models and filters for embedding-capable ones. Falls back to the full model list if no embedding models are found.
func FetchEmbeddingModelOptionsCmd ¶ added in v0.4.0
func FetchEmbeddingModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
FetchEmbeddingModelOptionsCmd returns a Bubble Tea Cmd that fetches embedding model options asynchronously.
func FetchModelOptions ¶
FetchModelOptions fetches available models from a provider. Returns a sorted list of model IDs, or nil if fetching fails. The currentModel (if non-empty) is always included in the result.
func FetchModelOptionsCmd ¶ added in v0.4.0
func FetchModelOptionsCmd(fieldKey, providerID string, cfg *config.Config, currentModel string) tea.Cmd
FetchModelOptionsCmd returns a Bubble Tea Cmd that fetches model options asynchronously and sends a FieldOptionsLoadedMsg when complete.
func FetchModelOptionsWithError ¶
func FetchModelOptionsWithError(providerID string, cfg *config.Config, currentModel string) ([]string, error)
FetchModelOptionsWithError is like FetchModelOptions but also returns the error when model fetching fails, for diagnostic feedback.
func NewA2AForm ¶
NewA2AForm creates the A2A Protocol configuration form.
func NewAgentForm ¶
NewAgentForm creates the Agent configuration form.
func NewAgentMemoryForm ¶ added in v0.4.0
NewAgentMemoryForm creates the Agent Memory configuration form.
func NewAlertingForm ¶ added in v0.7.0
NewAlertingForm creates the Alerting configuration form.
func NewAutoAdjustForm ¶ added in v0.7.0
NewAutoAdjustForm creates the Auto-Adjust configuration form.
func NewBackgroundForm ¶
NewBackgroundForm creates the Background Tasks configuration form.
func NewChannelsForm ¶
NewChannelsForm creates the Channels configuration form.
func NewContextBudgetForm ¶ added in v0.7.0
NewContextBudgetForm creates the Context Budget configuration form.
func NewContextProfileForm ¶ added in v0.7.0
NewContextProfileForm creates the Context Profile configuration form.
func NewCronForm ¶
NewCronForm creates the Cron Scheduler configuration form.
func NewDBEncryptionForm ¶
NewDBEncryptionForm creates the Security DB Encryption configuration form.
func NewEconomyEscrowForm ¶ added in v0.5.0
NewEconomyEscrowForm creates the Economy Escrow configuration form.
func NewEconomyEscrowOnChainForm ¶ added in v0.5.0
NewEconomyEscrowOnChainForm creates the on-chain escrow configuration form.
func NewEconomyForm ¶ added in v0.5.0
NewEconomyForm creates the Economy configuration form.
func NewEconomyNegotiationForm ¶ added in v0.5.0
NewEconomyNegotiationForm creates the Economy Negotiation configuration form.
func NewEconomyPricingForm ¶ added in v0.5.0
NewEconomyPricingForm creates the Economy Dynamic Pricing configuration form.
func NewEconomyRiskForm ¶ added in v0.5.0
NewEconomyRiskForm creates the Economy Risk configuration form.
func NewEmbeddingForm ¶
NewEmbeddingForm creates the Embedding & RAG configuration form.
func NewGatekeeperForm ¶ added in v0.6.0
NewGatekeeperForm creates the Gatekeeper (response sanitization) configuration form.
func NewGraphForm ¶
NewGraphForm creates the Graph Store configuration form.
func NewHooksForm ¶ added in v0.4.0
NewHooksForm creates the Hooks configuration form.
func NewKMSForm ¶
NewKMSForm creates the Security KMS configuration form.
func NewKnowledgeForm ¶
NewKnowledgeForm creates the Knowledge configuration form.
func NewLibrarianForm ¶
NewLibrarianForm creates the Librarian configuration form.
func NewLoggingForm ¶ added in v0.6.0
NewLoggingForm creates the Logging configuration form.
func NewMCPForm ¶ added in v0.4.0
NewMCPForm creates the MCP Servers configuration form.
func NewMCPServerForm ¶ added in v0.4.0
func NewMCPServerForm(name string, srv config.MCPServerConfig) *tuicore.FormModel
NewMCPServerForm creates a form for adding or editing a single MCP server.
func NewMultiAgentForm ¶
NewMultiAgentForm creates the Multi-Agent configuration form.
func NewOIDCProviderForm ¶
func NewOIDCProviderForm(id string, cfg config.OIDCProviderConfig) *tuicore.FormModel
NewOIDCProviderForm creates the OIDC Provider configuration form.
func NewOSSandboxForm ¶ added in v0.7.0
NewOSSandboxForm creates the OS Sandbox configuration form. Field keys use the "os_sandbox_" prefix to avoid collisions with the P2P sandbox form which uses the "sandbox_" prefix.
func NewObservabilityForm ¶ added in v0.5.0
NewObservabilityForm creates the Observability configuration form.
func NewObservationalMemoryForm ¶
NewObservationalMemoryForm creates the Observational Memory configuration form.
func NewOntologyForm ¶ added in v0.7.0
NewOntologyForm creates the Ontology configuration form covering the main toggle, ACL, governance, and P2P exchange sub-sections.
func NewOutputManagerForm ¶ added in v0.6.0
NewOutputManagerForm creates the Output Manager configuration form.
func NewP2PForm ¶
NewP2PForm creates the P2P Network configuration form.
func NewP2POwnerProtectionForm ¶
NewP2POwnerProtectionForm creates the P2P Owner Protection configuration form.
func NewP2PPricingForm ¶
NewP2PPricingForm creates the P2P Pricing configuration form.
func NewP2PSandboxForm ¶
NewP2PSandboxForm creates the P2P Sandbox configuration form.
func NewP2PWorkspaceForm ¶ added in v0.6.0
NewP2PWorkspaceForm creates the P2P Workspace configuration form.
func NewP2PZKPForm ¶
NewP2PZKPForm creates the P2P ZKP configuration form.
func NewPaymentForm ¶
NewPaymentForm creates the Payment configuration form.
func NewProvenanceForm ¶ added in v0.7.0
NewProvenanceForm creates the Provenance configuration form.
func NewProviderForm ¶
func NewProviderForm(id string, cfg config.ProviderConfig) *tuicore.FormModel
NewProviderForm creates a Provider configuration form.
func NewProviderFromConfig ¶
func NewProviderFromConfig(id string, pCfg config.ProviderConfig) provider.Provider
NewProviderFromConfig creates a lightweight provider instance from config. Returns nil if the provider cannot be created (missing API key, unknown type, etc.). Environment variable references (${VAR}) in APIKey and BaseURL are expanded.
func NewRetrievalForm ¶ added in v0.7.0
NewRetrievalForm creates the Retrieval configuration form.
func NewRunLedgerForm ¶ added in v0.7.0
NewRunLedgerForm creates the RunLedger configuration form.
func NewSecurityForm ¶
NewSecurityForm creates the Security configuration form.
func NewServerForm ¶
NewServerForm creates the Server configuration form.
func NewSessionForm ¶
NewSessionForm creates the Session configuration form.
func NewSkillForm ¶
NewSkillForm creates the Skill configuration form.
func NewSmartAccountForm ¶ added in v0.5.0
NewSmartAccountForm creates the Smart Account configuration form.
func NewSmartAccountModulesForm ¶ added in v0.5.0
NewSmartAccountModulesForm creates the Smart Account Modules configuration form.
func NewSmartAccountPaymasterForm ¶ added in v0.5.0
NewSmartAccountPaymasterForm creates the Smart Account Paymaster configuration form.
func NewSmartAccountSessionForm ¶ added in v0.5.0
NewSmartAccountSessionForm creates the Smart Account Session configuration form.
func NewToolsForm ¶
NewToolsForm creates the Tools configuration form.
func NewWorkflowForm ¶
NewWorkflowForm creates the Workflow Engine configuration form.
func ParseCustomPatterns ¶
ParseCustomPatterns parses a comma-separated "name:regex" string into a map.
Types ¶
type AuthProviderItem ¶
AuthProviderItem represents an OIDC provider in the list.
type AuthProvidersListModel ¶
type AuthProvidersListModel struct {
Providers []AuthProviderItem
Cursor int
Selected string // ID of selected provider, or "NEW"
Deleted string // ID of provider to delete
Exit bool // True if user wants to go back
}
AuthProvidersListModel manages the OIDC provider list UI.
func NewAuthProvidersListModel ¶
func NewAuthProvidersListModel(cfg *config.Config) AuthProvidersListModel
NewAuthProvidersListModel creates a new model from config.
func (AuthProvidersListModel) Init ¶
func (m AuthProvidersListModel) Init() tea.Cmd
Init implements tea.Model.
func (AuthProvidersListModel) Update ¶
func (m AuthProvidersListModel) Update(msg tea.Msg) (AuthProvidersListModel, tea.Cmd)
Update handles key events for the OIDC provider list.
func (AuthProvidersListModel) View ¶
func (m AuthProvidersListModel) View() string
View renders the OIDC provider list.
type DepResult ¶ added in v0.6.0
type DepResult struct {
Dependency
Status DepStatus
}
DepResult holds the evaluated result of a single dependency check.
type DepStatus ¶ added in v0.6.0
type DepStatus int
DepStatus represents the status of a dependency.
type Dependency ¶ added in v0.6.0
type Dependency struct {
// CategoryID is the settings category that must be configured.
CategoryID string
// Label is a human-readable name shown in the prerequisite panel.
Label string
// Required marks whether the dependency is mandatory (vs. optional/enhancing).
Required bool
// Check evaluates the dependency against the current config.
Check func(cfg *config.Config) DepStatus
// FixHint is a short hint shown when the dependency is unmet.
FixHint string
}
Dependency describes a single prerequisite for a feature category.
type DependencyIndex ¶ added in v0.6.0
type DependencyIndex struct {
// contains filtered or unexported fields
}
DependencyIndex provides O(1) lookup of dependencies by target category ID.
func NewDependencyIndex ¶ added in v0.6.0
func NewDependencyIndex() *DependencyIndex
NewDependencyIndex builds the index from the default dependency graph.
func (*DependencyIndex) AllTransitiveUnmet ¶ added in v0.6.0
func (idx *DependencyIndex) AllTransitiveUnmet(categoryID string, cfg *config.Config) []DepResult
AllTransitiveUnmet collects all transitively unmet required dependencies. It guards against cycles via a visited set.
func (*DependencyIndex) Dependents ¶ added in v0.6.0
func (idx *DependencyIndex) Dependents(categoryID string) []string
Dependents returns the list of category IDs that depend on the given category.
func (*DependencyIndex) Evaluate ¶ added in v0.6.0
func (idx *DependencyIndex) Evaluate(categoryID string, cfg *config.Config) []DepResult
Evaluate returns evaluated dependency results for the given category.
func (*DependencyIndex) HasDependencies ¶ added in v0.6.0
func (idx *DependencyIndex) HasDependencies(categoryID string) bool
HasDependencies returns true if the category has any registered dependencies.
func (*DependencyIndex) UnmetRequired ¶ added in v0.6.0
func (idx *DependencyIndex) UnmetRequired(categoryID string, cfg *config.Config) int
UnmetRequired returns the count of unmet required dependencies for a category.
type DependencyPanel ¶ added in v0.6.0
DependencyPanel shows prerequisite status for a category. It is a pure rendering component with cursor navigation.
func NewDependencyPanel ¶ added in v0.6.0
func NewDependencyPanel(categoryID string, results []DepResult) *DependencyPanel
NewDependencyPanel creates a panel for the given category's dependency results. Returns nil if all dependencies are met (no panel needed).
func (*DependencyPanel) MoveDown ¶ added in v0.6.0
func (p *DependencyPanel) MoveDown()
MoveDown moves the cursor down.
func (*DependencyPanel) MoveUp ¶ added in v0.6.0
func (p *DependencyPanel) MoveUp()
MoveUp moves the cursor up.
func (*DependencyPanel) SelectedCategoryID ¶ added in v0.6.0
func (p *DependencyPanel) SelectedCategoryID() string
SelectedCategoryID returns the category ID at the current cursor position.
func (*DependencyPanel) SelectedIsUnmet ¶ added in v0.6.0
func (p *DependencyPanel) SelectedIsUnmet() bool
SelectedIsUnmet returns true if the currently selected dependency is unmet.
func (*DependencyPanel) StatusSummary ¶ added in v0.6.0
func (p *DependencyPanel) StatusSummary() string
StatusSummary returns a short summary like "1/3 met".
func (*DependencyPanel) UnmetCount ¶ added in v0.6.0
func (p *DependencyPanel) UnmetCount() int
UnmetCount returns the number of unmet (required) dependencies.
func (*DependencyPanel) View ¶ added in v0.6.0
func (p *DependencyPanel) View() string
View renders the dependency panel.
type Editor ¶
type Editor struct {
// Embedded mode
OnSave OnSaveFunc // if set, save calls this instead of tea.Quit
// Public status
Completed bool
Cancelled bool
// contains filtered or unexported fields
}
Editor is the main bubbletea model for the settings editor.
func NewEditor ¶
func NewEditor() *Editor
NewEditor creates a new settings editor with default config.
func NewEditorForEmbedding ¶ added in v0.7.0
func NewEditorForEmbedding(cfg *config.Config, onSave OnSaveFunc) *Editor
NewEditorForEmbedding creates a settings editor suitable for embedding in another TUI (e.g. cockpit). It skips the welcome step and uses the provided callback for save instead of calling tea.Quit.
func NewEditorWithConfig ¶
NewEditorWithConfig creates a new settings editor pre-loaded with the given config.
type EditorStep ¶
type EditorStep int
EditorStep represents the current step in the settings editor.
const ( StepWelcome EditorStep = iota StepMenu StepForm StepProvidersList StepAuthProvidersList StepMCPServersList StepSetupFlow StepComplete )
type MCPServerItem ¶ added in v0.4.0
MCPServerItem represents an MCP server in the list.
type MCPServersListModel ¶ added in v0.4.0
type MCPServersListModel struct {
Servers []MCPServerItem
Cursor int
Selected string // Name of selected server, or "NEW"
Deleted string // Name of server to delete
Exit bool // True if user wants to go back
}
MCPServersListModel manages the MCP server list UI.
func NewMCPServersListModel ¶ added in v0.4.0
func NewMCPServersListModel(cfg *config.Config) MCPServersListModel
NewMCPServersListModel creates a new model from config.
func (MCPServersListModel) Init ¶ added in v0.4.0
func (m MCPServersListModel) Init() tea.Cmd
Init implements tea.Model.
func (MCPServersListModel) Update ¶ added in v0.4.0
func (m MCPServersListModel) Update(msg tea.Msg) (MCPServersListModel, tea.Cmd)
Update handles key events for the MCP server list.
func (MCPServersListModel) View ¶ added in v0.4.0
func (m MCPServersListModel) View() string
View renders the MCP server list.
type MenuModel ¶
type MenuModel struct {
Sections []Section
Cursor int
Selected string
Width int
Height int
// Checkers for smart filters
DirtyChecker func(string) bool // returns true if category config has been modified
EnabledChecker func(string) bool // returns true if category feature is enabled
DependencyChecker func(string) int // returns count of unmet required dependencies
// contains filtered or unexported fields
}
MenuModel manages the configuration menu.
func NewMenuModel ¶
func NewMenuModel() MenuModel
NewMenuModel creates a new menu model with grouped configuration categories.
func (MenuModel) ActiveSectionTitle ¶ added in v0.6.0
ActiveSectionTitle returns the title of the currently active section (Level 2).
func (MenuModel) AllCategories ¶
AllCategories returns a flat list of all categories (public, for tests).
func (MenuModel) InCategoryLevel ¶ added in v0.6.0
InCategoryLevel returns true when the menu is at Level 2 (categories within a section).
func (MenuModel) IsSearching ¶
IsSearching returns true when the menu is in search mode.
func (MenuModel) ShowAdvanced ¶ added in v0.6.0
ShowAdvanced returns the current advanced mode state.
type OnSaveFunc ¶ added in v0.7.0
OnSaveFunc is the callback type for embedded-mode save. It receives the current config and a map of dirty (modified) field keys.
type ProviderItem ¶
ProviderItem represents a provider in the list.
type ProvidersListModel ¶
type ProvidersListModel struct {
Providers []ProviderItem
Cursor int
Selected string // ID of selected provider, or "NEW"
Deleted string // ID of provider to delete
Exit bool // True if user wants to go back
}
ProvidersListModel manages the provider list UI.
func NewProvidersListModel ¶
func NewProvidersListModel(cfg *config.Config) ProvidersListModel
NewProvidersListModel creates a new model from config.
func (ProvidersListModel) Init ¶
func (m ProvidersListModel) Init() tea.Cmd
Init implements tea.Model.
func (ProvidersListModel) Update ¶
func (m ProvidersListModel) Update(msg tea.Msg) (ProvidersListModel, tea.Cmd)
Update handles key events for the provider list.
func (ProvidersListModel) View ¶
func (m ProvidersListModel) View() string
View renders the provider list.
type SetupFlow ¶ added in v0.6.0
type SetupFlow struct {
// contains filtered or unexported fields
}
SetupFlow chains dependency forms before the target form.
func NewSetupFlow ¶ added in v0.6.0
func NewSetupFlow(targetID string, unmetDeps []DepResult, configState *tuicore.ConfigState) *SetupFlow
NewSetupFlow creates a guided setup flow from unmet transitive dependencies. Returns nil if fewer than 1 unmet dependency (no flow needed).
func (*SetupFlow) ActiveForm ¶ added in v0.6.0
ActiveForm returns the form model for the current step.
func (*SetupFlow) Cancel ¶ added in v0.6.0
func (sf *SetupFlow) Cancel()
Cancel cancels the setup flow.
func (*SetupFlow) NextStep ¶ added in v0.6.0
func (sf *SetupFlow) NextStep()
NextStep saves the current form and advances to the next step.
func (*SetupFlow) SkipStep ¶ added in v0.6.0
func (sf *SetupFlow) SkipStep()
SkipStep marks the current step as skipped and advances.
func (*SetupFlow) State ¶ added in v0.6.0
func (sf *SetupFlow) State() SetupFlowState
State returns the current flow state.
type SetupFlowState ¶ added in v0.6.0
type SetupFlowState int
SetupFlowState tracks the guided setup flow lifecycle.
const ( SetupInProgress SetupFlowState = iota SetupCompleted SetupCancelled )
Source Files
¶
- auth_providers_list.go
- dependencies.go
- dependency_panel.go
- editor.go
- forms_agent.go
- forms_alerting.go
- forms_automation.go
- forms_economy.go
- forms_hooks.go
- forms_impl.go
- forms_knowledge.go
- forms_mcp.go
- forms_observability.go
- forms_ontology.go
- forms_p2p.go
- forms_sandbox.go
- forms_security.go
- forms_smartaccount.go
- forms_system.go
- mcp_servers_list.go
- menu.go
- model_fetcher.go
- providers_list.go
- settings.go
- setup_flow.go