config

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatConfig added in v0.8.0

type ChatConfig struct {
	DefaultModel string `yaml:"default_model"`
	SystemPrompt string `yaml:"system_prompt"`
}

ChatConfig contains chat-related settings

type CompactConfig added in v0.2.0

type CompactConfig struct {
	OutputDir string `yaml:"output_dir"`
}

CompactConfig contains settings for compact command

type Config

type Config struct {
	Gateway GatewayConfig `yaml:"gateway"`
	Output  OutputConfig  `yaml:"output"`
	Tools   ToolsConfig   `yaml:"tools"`
	Compact CompactConfig `yaml:"compact"`
	Chat    ChatConfig    `yaml:"chat"`
	Fetch   FetchConfig   `yaml:"fetch"`
}

Config represents the CLI configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a default configuration

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

LoadConfig loads configuration from file

func (*Config) SaveConfig

func (c *Config) SaveConfig(configPath string) error

SaveConfig saves configuration to file

type FetchCacheConfig added in v0.11.1

type FetchCacheConfig struct {
	Enabled bool  `yaml:"enabled"`
	TTL     int   `yaml:"ttl"`
	MaxSize int64 `yaml:"max_size"`
}

FetchCacheConfig contains cache settings for fetch operations

type FetchConfig added in v0.11.1

type FetchConfig struct {
	Enabled            bool              `yaml:"enabled"`
	WhitelistedDomains []string          `yaml:"whitelisted_domains"`
	GitHub             GitHubFetchConfig `yaml:"github"`
	Safety             FetchSafetyConfig `yaml:"safety"`
	Cache              FetchCacheConfig  `yaml:"cache"`
}

FetchConfig contains settings for content fetching

type FetchSafetyConfig added in v0.11.1

type FetchSafetyConfig struct {
	MaxSize       int64 `yaml:"max_size"`
	Timeout       int   `yaml:"timeout"`
	AllowRedirect bool  `yaml:"allow_redirect"`
}

FetchSafetyConfig contains safety settings for fetch operations

type GatewayConfig

type GatewayConfig struct {
	URL     string `yaml:"url"`
	APIKey  string `yaml:"api_key"`
	Timeout int    `yaml:"timeout"`
}

GatewayConfig contains gateway connection settings

type GitHubFetchConfig added in v0.11.1

type GitHubFetchConfig struct {
	Enabled bool   `yaml:"enabled"`
	Token   string `yaml:"token"`
	BaseURL string `yaml:"base_url"`
}

GitHubFetchConfig contains GitHub-specific fetch settings

type OutputConfig

type OutputConfig struct {
	Format string `yaml:"format"`
	Quiet  bool   `yaml:"quiet"`
}

OutputConfig contains output formatting settings

type SafetyConfig added in v0.3.0

type SafetyConfig struct {
	RequireApproval bool `yaml:"require_approval"`
}

SafetyConfig contains safety approval settings

type ToolWhitelistConfig

type ToolWhitelistConfig struct {
	Commands []string `yaml:"commands"`
	Patterns []string `yaml:"patterns"`
}

ToolWhitelistConfig contains whitelisted commands and patterns

type ToolsConfig

type ToolsConfig struct {
	Enabled      bool                `yaml:"enabled"`
	Whitelist    ToolWhitelistConfig `yaml:"whitelist"`
	Safety       SafetyConfig        `yaml:"safety"`
	ExcludePaths []string            `yaml:"exclude_paths"`
}

ToolsConfig contains tool execution settings

Jump to

Keyboard shortcuts

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