settings

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(data Data) error

Save writes settings.json atomically.

Types

type API

type API struct{}

func NewAPI

func NewAPI() *API

func (*API) Get

func (api *API) Get(ctx context.Context, requester interface{}, request *GetRequest) (*Data, error)

func (*API) Update

func (api *API) Update(ctx context.Context, requester interface{}, request *UpdateRequest) (*Data, error)

type ComposerSettings

type ComposerSettings struct {
	Harness string `json:"harness"`
	Model   string `json:"model"`
}

ComposerSettings selects the agent behind "Describe a change…".

type Data

type Data struct {
	Composer ComposerSettings `json:"composer"`
}

Data is everything settings.json holds. Empty fields mean "use the default" — for the composer, the first available harness.

func Load

func Load() (Data, error)

Load reads settings.json; a missing file is just defaults.

type GetRequest

type GetRequest struct{}

func (*GetRequest) Validate

func (r *GetRequest) Validate() error

type UpdateRequest

type UpdateRequest struct {
	Composer ComposerSettings `json:"composer"`
}

func (*UpdateRequest) Validate

func (r *UpdateRequest) Validate() error

Jump to

Keyboard shortcuts

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