Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoDefaultRole = errors.New("no default model role configured")
ErrNoDefaultRole is returned when no default role is configured.
Functions ¶
Types ¶
type CompactorConfig ¶ added in v0.0.4
type CompactorConfig struct {
Enabled *bool `json:"enabled,omitempty"`
SourceCodeFiltering string `json:"source_code_filtering,omitempty"` // "none", "minimal", "aggressive"
MaxChars int `json:"max_chars,omitempty"`
MaxLines int `json:"max_lines,omitempty"`
}
CompactorConfig holds user-overridable compaction settings. When nil in config, defaults are applied by the tools package.
type Config ¶
type Config struct {
Roles map[string]RoleConfig `json:"roles,omitempty"`
DefaultModel string `json:"defaultModel,omitempty"` // deprecated: use roles
DefaultProvider string `json:"defaultProvider"`
ThinkingLevel string `json:"thinkingLevel"`
Theme string `json:"theme"`
Tools map[string]any `json:"tools,omitempty"`
MCP *MCPConfig `json:"mcp,omitempty"`
Hooks []HookConfig `json:"hooks,omitempty"`
MaxDailyTokens int64 `json:"maxDailyTokens,omitempty"` // 0 = unlimited
Compactor *CompactorConfig `json:"compactor,omitempty"`
}
Config holds all pi-go configuration.
type HookConfig ¶
type HookConfig struct {
Event string `json:"event"`
Command string `json:"command"`
Tools []string `json:"tools,omitempty"`
Timeout int `json:"timeout,omitempty"`
}
HookConfig defines a shell command hook for tool call events.
type RoleConfig ¶
RoleConfig maps a role to a specific model and optional provider override.
Click to show internal directories.
Click to hide internal directories.