config

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: May 25, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Version: "1.8.4",
	Theme:   "dracula",
	AIProviderConfig: &providers.AIProviderConfig{
		Provider:        "openai",
		BaseURL:         "https://api.openai.com/v1",
		Model:           "gpt-4o",
		Stream:          true,
		EncodingFormat:  "float",
		Temperature:     nil,
		ReasoningEffort: nil,
		ApiVersion:      "",
		ApiKey:          "",
	},
}

DefaultConfig values

Functions

func GetConfigFileType added in v1.9.0

func GetConfigFileType(filename string) string

GetConfigFileType returns the type of the configuration file based on its extension

func InitFlags

func InitFlags(rootCmd *cobra.Command)

InitFlags initializes the flags for the root command.

Types

type Config

type Config struct {
	Version          string                      `mapstructure:"version"`
	Theme            string                      `mapstructure:"theme"`
	AIProviderConfig *providers.AIProviderConfig `mapstructure:"ai_provider_config"`
}

Config represents the structure of the configuration file

func LoadConfigs

func LoadConfigs(rootCmd *cobra.Command, cwd string) *Config

LoadConfigs initializes the configuration from file, flags, and environment variables, and returns the final config.

Jump to

Keyboard shortcuts

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