Documentation
¶
Overview ¶
Copyright 2026 Teradata
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Package config provides configuration types compatible with Crush's interface.
Index ¶
- Variables
- func HasInitialDataConfig() bool
- func ProjectNeedsInitialization() (bool, error)
- func Set(cfg *Config)
- type Agent
- type AgentType
- type Config
- func (c *Config) Agents() map[AgentType]Agent
- func (c *Config) GetModel() *Model
- func (c *Config) GetModelByType(modelType SelectedModelType) *Model
- func (c *Config) GetProviderForModel(modelID string) string
- func (c *Config) IsConfigured() bool
- func (c *Config) LSP() *LSPConfig
- func (c *Config) MCP() *MCPConfig
- func (c *Config) Models() []Model
- func (c *Config) SetCompactMode(compact bool)
- func (c *Config) SetWorkingDir(dir string)
- func (c *Config) UpdatePreferredModel(modelType SelectedModelType, model Model) error
- func (c *Config) WorkingDir() string
- type GlobalConfigData
- type LSPConfig
- type MCPConfig
- type Model
- type Options
- type SelectedModel
- type SelectedModelType
- type TUIOptions
Constants ¶
This section is empty.
Variables ¶
var Providers = []string{"anthropic", "bedrock", "ollama"}
Providers returns available model providers.
Functions ¶
func HasInitialDataConfig ¶
func HasInitialDataConfig() bool
HasInitialDataConfig returns true if initial data is configured.
func ProjectNeedsInitialization ¶
ProjectNeedsInitialization returns true if the project needs initialization. Returns (needsInit, error).
Types ¶
type Config ¶
type Config struct {
// Options
Options Options
// contains filtered or unexported fields
}
Config represents application configuration.
func (*Config) GetModelByType ¶
func (c *Config) GetModelByType(modelType SelectedModelType) *Model
GetModelByType returns the model for a given type.
func (*Config) GetProviderForModel ¶
GetProviderForModel returns the provider for a model.
func (*Config) IsConfigured ¶
IsConfigured returns true if the configuration is complete.
func (*Config) SetCompactMode ¶
SetCompactMode sets the compact mode option.
func (*Config) SetWorkingDir ¶
SetWorkingDir sets the working directory.
func (*Config) UpdatePreferredModel ¶
func (c *Config) UpdatePreferredModel(modelType SelectedModelType, model Model) error
UpdatePreferredModel updates the preferred model.
func (*Config) WorkingDir ¶
WorkingDir returns the working directory.
type GlobalConfigData ¶
type GlobalConfigData struct {
ConfigDir string
}
GlobalConfigData holds global config information.
type Model ¶
type Model struct {
Provider string
Model string
Name string
ContextWindow int
DefaultReasoningEffort string
ReasoningLevels []string
SupportsReasoning bool
SupportsImages bool
}
Model represents an LLM model configuration.
type SelectedModel ¶
SelectedModel represents the currently selected model.
type SelectedModelType ¶
type SelectedModelType string
SelectedModelType represents the type of selected model.
const ( SelectedModelTypeLarge SelectedModelType = "large" SelectedModelTypeSmall SelectedModelType = "small" )
type TUIOptions ¶
TUIOptions represents TUI-specific options.