Documentation
¶
Overview ¶
Package config manages application configuration from various sources.
Index ¶
- Constants
- Variables
- func ConfigFileFormat() string
- func DeleteLSP(language string) error
- func DeleteMCPServer(name string) error
- func DetectPreferredProjectContextPath(workDir string) (string, bool)
- func IsPrioritizedProjectContextPath(path string) bool
- func LoadGitHubToken() (string, error)
- func MarkProjectInitialized() error
- func OverrideAgentModel(agentName AgentName, modelID models.ModelID) error
- func Reload() error
- func ResolveConfigFilePath() (string, error)
- func ResolveProjectInitializationContextPath(workDir string) string
- func ShouldShowInitDialog() (bool, error)
- func UpdateAgent(agentName AgentName, agent Agent) error
- func UpdateAgentModel(agentName AgentName, modelID models.ModelID) error
- func UpdateAutoCompact(enabled bool) error
- func UpdateBash(bash BashConfig) error
- func UpdateDebug(enabled bool) error
- func UpdateEvaluator(eval EvaluatorConfig) error
- func UpdateGeneral(workingDir, logFile string, debugLSP bool, contextPaths []string, ...) error
- func UpdateInternalTools(internalToolsCfg InternalToolsConfig) error
- func UpdateLSP(language string, lsp LSPConfig) error
- func UpdateLua(lua LuaConfig) error
- func UpdateMCPGateway(gw MCPGatewayConfig) error
- func UpdateMCPServer(name string, server MCPServer) error
- func UpdateMesnada(mesnadaCfg MesnadaConfig) error
- func UpdatePermissions(perms PermissionsConfig) error
- func UpdatePersonaAutoSelect(pasCfg PersonaAutoSelectConfig) error
- func UpdateProvider(name models.ModelProvider, apiKey string, baseURL string, disabled bool) error
- func UpdateProviderOAuth(name models.ModelProvider, useOAuth bool) error
- func UpdateRemembrances(remembrancesCfg RemembrancesConfig) error
- func UpdateServer(server APIServerConfig) error
- func UpdateShell(path string, args []string) error
- func UpdateSkillsCatalog(sc SkillsCatalogConfig) error
- func UpdateSkillsEnabled(enabled bool) error
- func UpdateSnapshots(snap SnapshotsConfig) error
- func UpdateTheme(themeName string) error
- func Validate() error
- func WatchConfigFile(ctx context.Context, path string)
- func WorkingDirectory() string
- type ACPConfig
- type APIServerConfig
- type Agent
- type AgentName
- type BashConfig
- type CLIAssistConfig
- type Config
- type ConfigChangeEvent
- type Data
- type EvaluatorConfig
- type EventBus
- type InternalToolsConfig
- type LSPConfig
- type LSPPreset
- type LuaConfig
- type MCPGatewayConfig
- type MCPServer
- type MCPType
- type MesnadaACPConfig
- type MesnadaACPServerConfig
- type MesnadaConfig
- type MesnadaOrchestratorConfig
- type MesnadaServerConfig
- type MesnadaTUIConfig
- type PermissionsConfig
- type PersonaAutoSelectConfig
- type ProjectInitFlag
- type Provider
- type RemembrancesConfig
- type ShellConfig
- type SkillsCatalogConfig
- type SkillsConfig
- type SnapshotsConfig
- type TUIConfig
Constants ¶
const (
// InitFlagFilename is the name of the file that indicates whether the project has been initialized
InitFlagFilename = "init"
)
const (
MaxTokensFallbackDefault = 4096
)
Application constants
Variables ¶
var Bus = newEventBus()
Bus is the global singleton event bus for configuration changes.
Functions ¶
func ConfigFileFormat ¶ added in v0.2.0
func ConfigFileFormat() string
ConfigFileFormat returns the format ("json" or "toml") of the active config file.
func DeleteMCPServer ¶
func DetectPreferredProjectContextPath ¶ added in v0.9.0
DetectPreferredProjectContextPath returns the highest-priority project context file that already exists in the working directory.
func IsPrioritizedProjectContextPath ¶ added in v0.9.0
IsPrioritizedProjectContextPath reports whether the path belongs to the exclusive project context file family where only one file should be used.
func LoadGitHubToken ¶
LoadGitHubToken loads a GitHub OAuth token from the saved Copilot login, environment variables, or compatible external tooling.
func MarkProjectInitialized ¶
func MarkProjectInitialized() error
MarkProjectInitialized marks the current project as initialized
func OverrideAgentModel ¶ added in v0.9.0
OverrideAgentModel updates the selected agent model only for the current process. The change is kept in memory and is not persisted to the config file.
func Reload ¶ added in v0.2.0
func Reload() error
Reload re-reads the config file and updates the global config. It resets the global config and reloads from disk.
func ResolveConfigFilePath ¶ added in v0.2.0
ResolveConfigFilePath finds the active config file path. A local config file (in the working directory) takes priority over the global one because mergeLocalConfig applies it after ReadInConfig, overriding any overlapping keys. Writes must go to the highest-priority file so that changes are not silently reverted on the next reload.
func ResolveProjectInitializationContextPath ¶ added in v0.9.0
ResolveProjectInitializationContextPath returns the preferred existing project context file, or the default file to create if none exists yet.
func ShouldShowInitDialog ¶
ShouldShowInitDialog checks if the initialization dialog should be shown for the current directory
func UpdateAgent ¶ added in v0.30.0
func UpdateAutoCompact ¶
func UpdateBash ¶ added in v0.30.0
func UpdateBash(bash BashConfig) error
func UpdateDebug ¶
func UpdateEvaluator ¶ added in v0.30.0
func UpdateEvaluator(eval EvaluatorConfig) error
func UpdateGeneral ¶ added in v0.30.0
func UpdateInternalTools ¶ added in v0.21.1
func UpdateInternalTools(internalToolsCfg InternalToolsConfig) error
UpdateInternalTools updates internal tools configuration and persists it to the config file.
func UpdateMCPGateway ¶ added in v0.30.0
func UpdateMCPGateway(gw MCPGatewayConfig) error
func UpdateMCPServer ¶
func UpdateMesnada ¶
func UpdateMesnada(mesnadaCfg MesnadaConfig) error
func UpdatePermissions ¶ added in v0.160.0
func UpdatePermissions(perms PermissionsConfig) error
func UpdatePersonaAutoSelect ¶ added in v0.41.0
func UpdatePersonaAutoSelect(pasCfg PersonaAutoSelectConfig) error
UpdatePersonaAutoSelect updates persona auto-select configuration and persists it.
func UpdateProvider ¶
func UpdateProviderOAuth ¶ added in v0.30.0
func UpdateProviderOAuth(name models.ModelProvider, useOAuth bool) error
UpdateProviderOAuth updates only the UseOAuth flag for the specified provider and persists the change.
func UpdateRemembrances ¶ added in v0.7.0
func UpdateRemembrances(remembrancesCfg RemembrancesConfig) error
UpdateRemembrances updates remembrances configuration and persists it to the config file.
func UpdateServer ¶ added in v0.30.0
func UpdateServer(server APIServerConfig) error
func UpdateShell ¶
func UpdateSkillsCatalog ¶ added in v0.32.1
func UpdateSkillsCatalog(sc SkillsCatalogConfig) error
UpdateSkillsCatalog updates skills catalog configuration and persists it to the config file.
func UpdateSkillsEnabled ¶
func UpdateSnapshots ¶ added in v0.30.0
func UpdateSnapshots(snap SnapshotsConfig) error
func UpdateTheme ¶
UpdateTheme updates the theme in the configuration and writes it to the config file.
func Validate ¶
func Validate() error
Validate checks if the configuration is valid and applies defaults where needed.
func WatchConfigFile ¶ added in v0.70.0
WatchConfigFile monitors path for changes and triggers a config reload when the file is written. A 200 ms debounce prevents double-events caused by editors that write files in two steps (truncate + write).
The goroutine shuts down cleanly when ctx is cancelled.
func WorkingDirectory ¶
func WorkingDirectory() string
WorkingDirectory returns the current working directory from the configuration.
Types ¶
type ACPConfig ¶ added in v0.100.0
type ACPConfig struct {
// Enabled controls whether the ACP server mode is available. Default: true.
Enabled bool `toml:"enabled" json:"enabled,omitempty"`
// MaxSessions limits the number of concurrent ACP sessions. Default: 10.
MaxSessions int `toml:"max_sessions" json:"max_sessions,omitempty"`
// IdleTimeout is the duration before an idle session is cleaned up. Default: "30m".
IdleTimeout string `toml:"idle_timeout" json:"idle_timeout,omitempty"`
// LogLevel controls logging verbosity for the ACP server. Default: "info".
LogLevel string `toml:"log_level" json:"log_level,omitempty"`
// AutoPermission enables automatic approval of tool permission requests.
// Set to true for CI/batch environments. Default: false.
AutoPermission bool `toml:"auto_permission" json:"auto_permission,omitempty"`
}
ACPConfig defines the configuration for the ACP (Agent Client Protocol) stdio server. This controls how Pando behaves when launched as a subprocess by editors like VS Code, Zed, or JetBrains.
type APIServerConfig ¶ added in v0.7.0
type APIServerConfig struct {
Enabled bool `json:"enabled,omitempty"`
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
RequireAuth bool `json:"requireAuth,omitempty"`
}
APIServerConfig holds configuration for the HTTP API server (WebUI backend).
type Agent ¶
type Agent struct {
Model models.ModelID `json:"model"`
MaxTokens int64 `json:"maxTokens"`
ReasoningEffort string `json:"reasoningEffort"` // For openai models low,medium,heigh
AutoCompact bool `json:"autoCompact,omitempty"` // enable auto-compaction when context fills up
AutoCompactThreshold float64 `json:"autoCompactThreshold,omitempty"` // 0.0-1.0, default 0.85
}
Agent defines configuration for different LLM models and their token limits.
type BashConfig ¶ added in v0.30.0
type BashConfig struct {
// BannedCommands is the list of commands that the bash tool will refuse to execute.
// If empty, the default built-in list is used.
BannedCommands []string `json:"bannedCommands,omitempty"`
// AllowedCommands, when non-empty, removes specific commands from the default banned list.
AllowedCommands []string `json:"allowedCommands,omitempty"`
}
BashConfig defines configuration for the bash tool, including command restrictions.
type CLIAssistConfig ¶ added in v0.32.1
type CLIAssistConfig struct {
Model models.ModelID `toml:"Model"`
Timeout int `toml:"Timeout"` // seconds, default 30
}
CLIAssistConfig defines configuration for the CLI assist mode.
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,omitempty"`
Debug bool `json:"debug,omitempty"`
LogFile string `json:"logFile,omitempty"`
DebugLSP bool `json:"debugLSP,omitempty"`
ContextPaths []string `json:"contextPaths,omitempty"`
Skills SkillsConfig `json:"skills,omitempty"`
SkillsCatalog SkillsCatalogConfig `json:"skillsCatalog,omitempty"`
TUI TUIConfig `json:"tui"`
Permissions PermissionsConfig `json:"permissions,omitempty"`
Mesnada MesnadaConfig `json:"mesnada,omitempty"`
Shell ShellConfig `json:"shell,omitempty"`
Bash BashConfig `json:"bash,omitempty"`
AutoCompact bool `json:"autoCompact,omitempty"`
Remembrances RemembrancesConfig `json:"remembrances,omitempty"`
Server APIServerConfig `json:"server,omitempty"`
Lua LuaConfig `json:"lua,omitempty"`
MCPGateway MCPGatewayConfig `json:"mcpGateway,omitempty"`
InternalTools InternalToolsConfig `json:"internalTools,omitempty"`
Snapshots SnapshotsConfig `json:"snapshots,omitempty"`
Evaluator EvaluatorConfig `json:"evaluator,omitempty" toml:"evaluator"`
CLIAssist CLIAssistConfig `json:"cliAssist,omitempty" toml:"cliAssist"`
PersonaAutoSelect PersonaAutoSelectConfig `json:"personaAutoSelect,omitempty"`
ACP ACPConfig `json:"acp,omitempty" toml:"acp"`
}
Config is the main configuration structure for the application.
func Get ¶
func Get() *Config
Get returns the current configuration. It's safe to call this function multiple times.
type ConfigChangeEvent ¶ added in v0.70.0
type ConfigChangeEvent struct {
// Section describes which part of the config changed (empty = full reload).
Section string `json:"section"`
// Timestamp is when the change occurred.
Timestamp time.Time `json:"timestamp"`
// Source identifies the origin of the change: "tui", "webui", or "file".
Source string `json:"source"`
}
ConfigChangeEvent represents a configuration change notification.
type Data ¶
type Data struct {
Directory string `json:"directory,omitempty"`
}
Data defines storage configuration.
type EvaluatorConfig ¶ added in v0.26.2
type EvaluatorConfig struct {
// Enabled activates the evaluation loop. Default: false (opt-in).
Enabled bool `toml:"enabled"`
// Model is the cheap/fast model used for LLM-as-Judge evaluation.
Model models.ModelID `toml:"model"`
// Provider specifies which LLM provider to use for the judge model.
Provider string `toml:"provider"`
// AlphaWeight is the importance of task success in reward. Default: 0.8.
// Reward formula: R = AlphaWeight * S_success + BetaWeight * S_tokens
AlphaWeight float64 `toml:"alphaWeight"`
// BetaWeight is the importance of token efficiency in reward. Default: 0.2.
BetaWeight float64 `toml:"betaWeight"`
// ExplorationC is the UCB1 exploration factor. Default: 1.41 (sqrt(2)).
ExplorationC float64 `toml:"explorationC"`
// MinSessionsForUCB is the min evaluated sessions before UCB activates. Default: 5.
MinSessionsForUCB int `toml:"minSessionsForUCB"`
// CorrectionsPatterns are regex patterns that indicate user corrections.
CorrectionsPatterns []string `toml:"correctionsPatterns"`
// MaxTokensBaseline is the rolling window size for token efficiency. Default: 50.
MaxTokensBaseline int `toml:"maxTokensBaseline"`
// MaxSkills is the max active skills in the library. Default: 100.
MaxSkills int `toml:"maxSkills"`
// JudgePromptTemplate is optional path to a custom judge prompt template.
JudgePromptTemplate string `toml:"judgePromptTemplate"`
// Async runs evaluation in background after session end. Default: true.
Async bool `toml:"async"`
}
EvaluatorConfig controls the self-improvement evaluation loop.
type EventBus ¶ added in v0.70.0
type EventBus struct {
// contains filtered or unexported fields
}
EventBus is a simple fan-out publisher for ConfigChangeEvent. Subscribers register a channel; the bus delivers events to all of them.
func (*EventBus) Publish ¶ added in v0.70.0
func (b *EventBus) Publish(event ConfigChangeEvent)
Publish sends event to every registered subscriber. Subscribers that cannot receive (full channel) are skipped to avoid blocking.
func (*EventBus) Subscribe ¶ added in v0.70.0
func (b *EventBus) Subscribe(ch chan ConfigChangeEvent)
Subscribe registers ch to receive future ConfigChangeEvents. The caller owns the channel and is responsible for draining it.
func (*EventBus) Unsubscribe ¶ added in v0.70.0
func (b *EventBus) Unsubscribe(ch chan ConfigChangeEvent)
Unsubscribe removes ch from the bus. No more events will be sent to it.
type InternalToolsConfig ¶ added in v0.20.0
type InternalToolsConfig struct {
// Fetch tool
FetchEnabled bool `json:"fetchEnabled,omitempty"`
FetchMaxSizeMB int `json:"fetchMaxSizeMB,omitempty"`
// Google Custom Search
GoogleSearchEnabled bool `json:"googleSearchEnabled,omitempty"`
GoogleAPIKey string `json:"googleApiKey,omitempty"`
GoogleSearchEngineID string `json:"googleSearchEngineId,omitempty"`
// Brave Search
BraveSearchEnabled bool `json:"braveSearchEnabled,omitempty"`
BraveAPIKey string `json:"braveApiKey,omitempty"`
// Perplexity AI Search
PerplexitySearchEnabled bool `json:"perplexitySearchEnabled,omitempty"`
PerplexityAPIKey string `json:"perplexityApiKey,omitempty"`
// Exa AI Search
ExaSearchEnabled bool `json:"exaSearchEnabled,omitempty"`
ExaAPIKey string `json:"exaApiKey,omitempty"`
// Context7 library docs (no API key required)
Context7Enabled bool `json:"context7Enabled,omitempty"`
// Browser automation (chromedp)
BrowserEnabled bool `json:"browserEnabled,omitempty" toml:"BrowserEnabled"`
BrowserHeadless bool `json:"browserHeadless,omitempty" toml:"BrowserHeadless"`
BrowserTimeout int `json:"browserTimeout,omitempty" toml:"BrowserTimeout"`
BrowserUserDataDir string `json:"browserUserDataDir,omitempty" toml:"BrowserUserDataDir"`
BrowserMaxSessions int `json:"browserMaxSessions,omitempty" toml:"BrowserMaxSessions"`
}
InternalToolsConfig defines configuration for Pando's built-in tool integrations.
type LSPConfig ¶
type LSPConfig struct {
Disabled bool `json:"disabled"`
Command string `json:"command"`
Args []string `json:"args"`
Options any `json:"options"`
// Languages is a list of file extensions (e.g. ".go", ".ts") or language IDs
// this server handles. Used to filter which LSP clients are queried for a
// given file. If empty, the server is queried for all files.
Languages []string `json:"languages,omitempty"`
}
LSPConfig defines configuration for Language Server Protocol integration.
type LSPPreset ¶ added in v0.41.0
type LSPPreset struct {
// Name is the identifier used as map key in Config.LSP.
Name string
Description string
Config LSPConfig
}
LSPPreset defines a well-known LSP server configuration template.
func LSPPresetByName ¶ added in v0.41.0
LSPPresetByName returns the preset with the given name, or false if not found.
func LSPPresets ¶ added in v0.41.0
func LSPPresets() []LSPPreset
LSPPresets returns the list of built-in LSP server presets. These represent the most commonly used language servers; users can override command/args by editing their project config.
type LuaConfig ¶ added in v0.8.0
type LuaConfig struct {
Enabled bool `json:"enabled,omitempty" toml:"Enabled"`
ScriptPath string `json:"script_path,omitempty" toml:"ScriptPath"`
Timeout string `json:"timeout,omitempty" toml:"Timeout"` // e.g. "5s"
StrictMode bool `json:"strict_mode,omitempty" toml:"StrictMode"`
HotReload bool `json:"hot_reload,omitempty" toml:"HotReload"`
LogFilteredData bool `json:"log_filtered_data,omitempty" toml:"LogFilteredData"`
}
LuaConfig defines configuration for the Lua scripting engine.
type MCPGatewayConfig ¶ added in v0.8.0
type MCPGatewayConfig struct {
Enabled bool `json:"enabled,omitempty" toml:"Enabled"`
FavoriteThreshold int `json:"favorite_threshold,omitempty" toml:"FavoriteThreshold"`
MaxFavorites int `json:"max_favorites,omitempty" toml:"MaxFavorites"`
FavoriteWindowDays int `json:"favorite_window_days,omitempty" toml:"FavoriteWindowDays"`
DecayDays int `json:"decay_days,omitempty" toml:"DecayDays"`
}
MCPGatewayConfig defines configuration for the MCP gateway subsystem.
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 MesnadaACPConfig ¶
type MesnadaACPConfig struct {
Enabled bool `json:"enabled,omitempty"`
DefaultAgent string `json:"defaultAgent,omitempty"`
AutoPermission bool `json:"autoPermission,omitempty"`
Server MesnadaACPServerConfig `json:"server,omitempty"`
}
MesnadaACPConfig holds ACP agent configuration
type MesnadaACPServerConfig ¶ added in v0.7.0
type MesnadaACPServerConfig struct {
Enabled bool `json:"enabled,omitempty"`
Transports []string `json:"transports,omitempty"` // ["stdio", "http"]
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
MaxSessions int `json:"maxSessions,omitempty"`
SessionTimeout string `json:"sessionTimeout,omitempty"`
RequireAuth bool `json:"requireAuth,omitempty"`
}
MesnadaACPServerConfig holds configuration for the ACP server.
type MesnadaConfig ¶
type MesnadaConfig struct {
Enabled bool `json:"enabled,omitempty"`
Server MesnadaServerConfig `json:"server,omitempty"`
Orchestrator MesnadaOrchestratorConfig `json:"orchestrator,omitempty"`
ACP MesnadaACPConfig `json:"acp,omitempty"`
TUI MesnadaTUIConfig `json:"tui,omitempty"`
}
MesnadaConfig holds all mesnada integration configuration
type MesnadaOrchestratorConfig ¶
type MesnadaOrchestratorConfig struct {
StorePath string `json:"storePath,omitempty"`
LogDir string `json:"logDir,omitempty"`
MaxParallel int `json:"maxParallel,omitempty"`
DefaultEngine string `json:"defaultEngine,omitempty"`
DefaultModel string `json:"defaultModel,omitempty"`
DefaultMCPConfig string `json:"defaultMcpConfig,omitempty"`
PersonaPath string `json:"personaPath,omitempty"`
}
MesnadaOrchestratorConfig holds orchestrator settings
type MesnadaServerConfig ¶
type MesnadaServerConfig struct {
Host string `json:"host,omitempty"`
Port int `json:"port,omitempty"`
}
MesnadaServerConfig holds mesnada HTTP server configuration
type MesnadaTUIConfig ¶
type MesnadaTUIConfig struct {
Enabled bool `json:"enabled,omitempty"`
WebUI bool `json:"webui,omitempty"`
}
MesnadaTUIConfig holds mesnada TUI settings
type PermissionsConfig ¶ added in v0.160.0
type PermissionsConfig struct {
AutoApproveTools bool `json:"autoApproveTools,omitempty"`
}
PermissionsConfig defines runtime permission behavior for local interactive sessions.
type PersonaAutoSelectConfig ¶ added in v0.41.0
type PersonaAutoSelectConfig struct {
// Enabled activates automatic persona selection. Default: false.
Enabled bool `json:"enabled,omitempty"`
// PersonaPath is the directory containing persona .md files.
// When empty, falls back to mesnada.orchestrator.personaPath.
PersonaPath string `json:"personaPath,omitempty"`
}
PersonaAutoSelectConfig configures automatic persona selection for the main session. When enabled, a lite model analyses each user prompt and prepends the most relevant persona's content before the message is sent to the main conversation model.
type ProjectInitFlag ¶
type ProjectInitFlag struct {
Initialized bool `json:"initialized"`
}
ProjectInitFlag represents the initialization status for a project directory
type Provider ¶
type Provider struct {
APIKey string `json:"apiKey"`
BaseURL string `json:"baseURL,omitempty"`
Disabled bool `json:"disabled"`
// UseOAuth enables OAuth mode for the anthropic provider (claude.ai OAuth instead of API key).
UseOAuth bool `json:"useOAuth,omitempty"`
}
Provider defines configuration for an LLM provider.
type RemembrancesConfig ¶ added in v0.7.0
type RemembrancesConfig struct {
Enabled bool `json:"enabled" toml:"Enabled"`
KBPath string `json:"kb_path" toml:"KBPath"`
KBWatch bool `json:"kb_watch" toml:"KBWatch"`
KBAutoImport bool `json:"kb_auto_import" toml:"KBAutoImport"`
DocumentEmbeddingProvider string `json:"document_embedding_provider" toml:"DocumentEmbeddingProvider"`
DocumentEmbeddingModel string `json:"document_embedding_model" toml:"DocumentEmbeddingModel"`
// DocumentEmbeddingBaseURL and DocumentEmbeddingAPIKey are used when DocumentEmbeddingProvider is "openai-compatible".
DocumentEmbeddingBaseURL string `json:"document_embedding_base_url" toml:"DocumentEmbeddingBaseURL"`
DocumentEmbeddingAPIKey string `json:"document_embedding_api_key" toml:"DocumentEmbeddingAPIKey"`
CodeEmbeddingProvider string `json:"code_embedding_provider" toml:"CodeEmbeddingProvider"`
CodeEmbeddingModel string `json:"code_embedding_model" toml:"CodeEmbeddingModel"`
// CodeEmbeddingBaseURL and CodeEmbeddingAPIKey are used when CodeEmbeddingProvider is "openai-compatible".
CodeEmbeddingBaseURL string `json:"code_embedding_base_url" toml:"CodeEmbeddingBaseURL"`
CodeEmbeddingAPIKey string `json:"code_embedding_api_key" toml:"CodeEmbeddingAPIKey"`
UseSameModel bool `json:"use_same_model" toml:"UseSameModel"`
ChunkSize int `json:"chunk_size" toml:"ChunkSize"`
ChunkOverlap int `json:"chunk_overlap" toml:"ChunkOverlap"`
IndexWorkers int `json:"index_workers" toml:"IndexWorkers"`
}
RemembrancesConfig defines configuration for the remembrances system.
type ShellConfig ¶
type ShellConfig struct {
Path string `json:"path,omitempty"`
Args []string `json:"args,omitempty"`
}
ShellConfig defines the configuration for the shell used by the bash tool.
type SkillsCatalogConfig ¶ added in v0.32.1
type SkillsCatalogConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
BaseURL string `json:"baseUrl" yaml:"baseUrl"`
AutoUpdate bool `json:"autoUpdate" yaml:"autoUpdate"`
DefaultScope string `json:"defaultScope" yaml:"defaultScope"` // "global" | "project"
}
SkillsCatalogConfig holds configuration for the skills.sh catalog integration.
type SkillsConfig ¶
type SkillsConfig struct {
Enabled bool `json:"enabled,omitempty"`
Paths []string `json:"paths,omitempty"`
}
SkillsConfig defines configuration for skill discovery and prompt injection.
type SnapshotsConfig ¶ added in v0.26.2
type SnapshotsConfig struct {
Enabled bool `json:"enabled,omitempty"`
MaxSnapshots int `json:"maxSnapshots,omitempty"`
MaxFileSize string `json:"maxFileSize,omitempty"` // e.g. "10MB"
ExcludePatterns []string `json:"excludePatterns,omitempty"` // e.g. ["*.log", "node_modules/"]
AutoCleanupDays int `json:"autoCleanupDays,omitempty"`
}
SnapshotsConfig defines configuration for the session snapshot system.
func (*SnapshotsConfig) ParseMaxFileSize ¶ added in v0.26.2
func (c *SnapshotsConfig) ParseMaxFileSize() int64
ParseMaxFileSize parses the MaxFileSize string to bytes. Supports suffixes: KB, MB, GB (case-insensitive). Default is 10MB.