config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GlobalDir

func GlobalDir() string

func GlobalPath

func GlobalPath() string

func RepoPath

func RepoPath(repoRoot string) string

func Save

func Save(cfg *Config, path string) error

Types

type ApprovalConfig

type ApprovalConfig struct {
	TextGeneration  string `json:"textGeneration"`
	PatchGeneration string `json:"patchGeneration"`
	FileWrite       string `json:"fileWrite"`
	GitExecution    string `json:"gitExecution"`
	Shell           string `json:"shell"`
}

type Config

type Config struct {
	DefaultBase string           `json:"defaultBase"`
	SyncMode    string           `json:"syncMode"`
	AutoStash   bool             `json:"autoStash"`
	Provider    string           `json:"provider"`
	Models      Models           `json:"models"`
	TestCommand string           `json:"testCommand"`
	LintCommand string           `json:"lintCommand"`
	Approval    ApprovalConfig   `json:"approval"`
	Guardrails  GuardrailsConfig `json:"guardrails"`
	Privacy     PrivacyConfig    `json:"privacy"`
}

func Default

func Default() *Config

func Load

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

func (*Config) IsHighRiskFile

func (c *Config) IsHighRiskFile(path string) bool

type GuardrailsConfig

type GuardrailsConfig struct {
	MaxLoopSteps                int      `json:"maxLoopSteps"`
	MinConfidenceToApply        float64  `json:"minConfidenceToApply"`
	AlwaysRunTestsAfterConflict bool     `json:"alwaysRunTestsAfterConflict"`
	WarnOnHighRiskFiles         bool     `json:"warnOnHighRiskFiles"`
	HighRiskPatterns            []string `json:"highRiskPatterns"`
}

type Models

type Models struct {
	Planning string `json:"planning"`
	Drafting string `json:"drafting"`
	Fallback string `json:"fallback"`
}

type PrivacyConfig

type PrivacyConfig struct {
	Mode          string `json:"mode"`
	RedactSecrets bool   `json:"redactSecrets"`
}

Jump to

Keyboard shortcuts

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