config

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2025 License: MIT Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"`
	WebSearch WebSearchConfig `yaml:"web_search"`
}

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.0

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.0

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.0

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.0

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

type WebSearchConfig added in v0.13.0

type WebSearchConfig struct {
	Enabled       bool     `yaml:"enabled"`
	DefaultEngine string   `yaml:"default_engine"`
	MaxResults    int      `yaml:"max_results"`
	Engines       []string `yaml:"engines"`
	Timeout       int      `yaml:"timeout"`
}

WebSearchConfig contains settings for web search functionality

Jump to

Keyboard shortcuts

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