config

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveGuidelinesContent

func ResolveGuidelinesContent(guidelinesPath string) (string, error)

ResolveGuidelinesContent fetches the content of a guideline, either from a file or the library.

Types

type Config

type Config struct {
	Base                         string         `mapstructure:"base"`
	Head                         string         `mapstructure:"head"`
	Model                        string         `mapstructure:"model"`
	Provider                     string         `mapstructure:"provider"`
	ProviderAPIKey               string         `mapstructure:"provider-api-key"`
	ProviderURL                  string         `mapstructure:"provider-url"`
	WorkingDir                   string         `mapstructure:"-"`
	MainGuidelines               string         `mapstructure:"main-guidelines"`
	SupplementalGuidelines       []string       `mapstructure:"supplemental-guidelines"`
	MaxTokens                    int            `mapstructure:"max-tokens"`
	ReviewOutputFile             string         `mapstructure:"review-output-file"`
	OutputJSONFile               string         `mapstructure:"output-json"`
	MetricsJSONFile              string         `mapstructure:"metrics-json"`
	ExtractionModel              string         `mapstructure:"extraction-model"`
	MetadataJSONFile             string         `mapstructure:"metadata-json"`
	ApprovalEvaluationPromptFile string         `mapstructure:"approval-evaluation-prompt-file"`
	DiffFile                     string         `mapstructure:"diff-file"`
	FilesListFile                string         `mapstructure:"files-list-file"`
	CommitsFile                  string         `mapstructure:"commits-file"`
	MCPConfigFile                string         `mapstructure:"mcp-config"`
	AllowURLFetch                bool           `mapstructure:"allow-url-fetch"`
	AllowAskDeveloper            bool           `mapstructure:"allow-ask-developer"`
	IgnoredLockFiles             []string       `mapstructure:"ignored-lock-files"`
	ConfigFile                   string         `mapstructure:"config"`
	WishlistDir                  string         `mapstructure:"wishlist-dir"`
	ProviderOptionsFile          string         `mapstructure:"provider-options-file"`
	ProviderOptions              map[string]any `mapstructure:"-"`
	Render                       string         `mapstructure:"render"`
	InteractivePostReview        bool           `mapstructure:"interactive-post-review"`
}

Config represents the complete configuration for a Cassandra reviewer.

func Load

func Load(configFile string) (*Config, error)

Load reads the configuration from a TOML file. It does NOT handle CLI flags or environment variables; the caller should bind those if needed before calling Unmarshal.

func NewDefaultConfig

func NewDefaultConfig() *Config

NewDefaultConfig returns a Config with default values populated.

func (*Config) LoadProviderOptions

func (cfg *Config) LoadProviderOptions() error

LoadProviderOptions loads provider options from the configured ProviderOptionsFile.

Jump to

Keyboard shortcuts

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