settings

package
v0.0.35 Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIBaseURL added in v0.0.34

func APIBaseURL() string

func GetCustomRulesJS added in v0.0.34

func GetCustomRulesJS() string

func IsProductionBuild added in v0.0.34

func IsProductionBuild() bool

Types

type AppConfig added in v0.0.34

type AppConfig struct {
	IdleThresholdSeconds        int         `json:"idle_threshold_seconds" mapstructure:"idle_threshold_seconds"`
	HistoryRetentionDays        int         `json:"history_retention_days" mapstructure:"history_retention_days"`
	DistractionAllowanceMinutes int         `json:"distraction_allowance_minutes" mapstructure:"distraction_allowance_minutes"`
	CustomRulesJS               []string    `json:"custom_rules_js" mapstructure:"custom_rules_js"`
	ClassificationLLMProvider   LLMProvider `json:"classification_llm_provider" mapstructure:"classification_llm_provider"`
}

AppConfig represents all configurable options for the application

func DefaultConfig added in v0.0.34

func DefaultConfig() AppConfig

DefaultConfig returns the default application configuration

func GetConfig added in v0.0.34

func GetConfig() *AppConfig

type LLMProvider added in v0.0.34

type LLMProvider string
const (
	LLMProviderGoogle    LLMProvider = "google"
	LLMProviderOpenAI    LLMProvider = "openai"
	LLMProviderGroq      LLMProvider = "groq"
	LLMProviderAnthropic LLMProvider = "anthropic"
	LLMProviderDummy     LLMProvider = "dummy"
)

type Service

type Service struct{}

This service exposes interface for the frontend to interact with viper to read/write settings through wails3 bindings mechanism

func NewService

func NewService(configDir string) (*Service, error)

func (*Service) GetConfig added in v0.0.34

func (s *Service) GetConfig() *AppConfig

func (*Service) SaveConfig added in v0.0.34

func (s *Service) SaveConfig(config AppConfig) error

Jump to

Keyboard shortcuts

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