Documentation
¶
Overview ¶
Package config manages application configuration from various sources.
Index ¶
Constants ¶
const (
// InitFlagFilename is the name of the file that indicates whether the project has been initialized
InitFlagFilename = "init"
)
Variables ¶
This section is empty.
Functions ¶
func MarkProjectInitialized ¶
func MarkProjectInitialized() error
MarkProjectInitialized marks the current project as initialized
func ShouldShowInitDialog ¶
ShouldShowInitDialog checks if the initialization dialog should be shown for the current directory
func Validate ¶
func Validate() error
Validate checks if the configuration is valid and applies defaults where needed. It validates model IDs and providers, ensuring they are supported.
func WorkingDirectory ¶
func WorkingDirectory() string
WorkingDirectory returns the current working directory from the configuration.
Types ¶
type Agent ¶
type Agent struct { Model models.ModelID `json:"model"` MaxTokens int64 `json:"maxTokens"` ReasoningEffort string `json:"reasoningEffort"` // For openai models low,medium,heigh }
Agent defines configuration for different LLM models and their token limits.
type Config ¶
type Config struct { Data Data `json:"data"` WorkingDir string `json:"wd,omitempty"` MCPServers map[string]MCPServer `json:"mcpServers,omitempty"` Providers map[models.ModelProvider]Provider `json:"providers,omitempty"` LSP map[string]LSPConfig `json:"lsp,omitempty"` Agents map[AgentName]Agent `json:"agents"` Debug bool `json:"debug,omitempty"` DebugLSP bool `json:"debugLSP,omitempty"` }
Config is the main configuration structure for the application.
type Data ¶
type Data struct {
Directory string `json:"directory"`
}
Data defines storage configuration.
type LSPConfig ¶
type LSPConfig struct { Disabled bool `json:"enabled"` Command string `json:"command"` Args []string `json:"args"` Options any `json:"options"` }
LSPConfig defines configuration for Language Server Protocol integration.
type MCPServer ¶
type MCPServer struct { Command string `json:"command"` Env []string `json:"env"` Args []string `json:"args"` Type MCPType `json:"type"` URL string `json:"url"` Headers map[string]string `json:"headers"` }
MCPServer defines the configuration for a Model Control Protocol server.
type ProjectInitFlag ¶
type ProjectInitFlag struct {
Initialized bool `json:"initialized"`
}
ProjectInitFlag represents the initialization status for a project directory