config

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

Types

type AgentConfig

type AgentConfig struct {
	Enabled   bool     `yaml:"enabled"`
	Command   string   `yaml:"command"`
	Model     string   `yaml:"model,omitempty"`
	ExtraArgs []string `yaml:"extra_args,omitempty"`
}

type Config

type Config struct {
	Agents   map[string]AgentConfig `yaml:"agents"`
	SideApps SideAppsConfig         `yaml:"side_apps"`
	UI       UIConfig               `yaml:"ui"`
	Tasks    TasksConfig            `yaml:"tasks"`
}

func DefaultConfig

func DefaultConfig() *Config

func Load

func Load() (*Config, error)

type ExtraAppDef

type ExtraAppDef struct {
	Name    string `yaml:"name"`
	Command string `yaml:"command"`
}

type SideAppsConfig

type SideAppsConfig struct {
	Editor string          `yaml:"editor"`
	Git    string          `yaml:"git"`
	Docker string          `yaml:"docker"`
	Extra  []ExtraAppDef   `yaml:"extra"`
	Enable map[string]bool `yaml:"enable"`
}

type State

type State struct {
	RecentProjects []string                `yaml:"recent_projects"`
	PreferredTasks map[string][]string     `yaml:"preferred_tasks,omitempty"`
	ProjectTasks   map[string][]StoredTask `yaml:"project_tasks,omitempty"`
}

func LoadState

func LoadState() *State

func (*State) IsPreferred

func (s *State) IsPreferred(projectDir, taskKey string) bool

func (*State) LoadProjectTasks

func (s *State) LoadProjectTasks(dir string) []StoredTask

func (*State) RecordProject

func (s *State) RecordProject(dir string)

func (*State) RemoveProject

func (s *State) RemoveProject(dir string)

func (*State) Save

func (s *State) Save() error

func (*State) SaveProjectTasks

func (s *State) SaveProjectTasks(dir string, tasks []StoredTask)

func (*State) TogglePreferred

func (s *State) TogglePreferred(projectDir, taskKey string)

type StoredTask

type StoredTask = task.StoredTask

StoredTask is re-exported for YAML serialization.

type TasksConfig

type TasksConfig struct {
	PackageManager string `yaml:"package_manager,omitempty"`
}

type UIConfig

type UIConfig struct {
	SidebarWidth int    `yaml:"sidebar_width"`
	ShowCost     bool   `yaml:"show_cost"`
	ShowTokens   bool   `yaml:"show_tokens"`
	MouseMode    string `yaml:"mouse_mode,omitempty"`
}

Jump to

Keyboard shortcuts

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