config

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultMessagePrompt string
View Source
var DefaultSystemPrompt string

Functions

func Dir

func Dir() (string, error)

Dir returns the jernel config directory path

func Init

func Init() error

Init ensures the config directory exists with all necessary files

func LoadMessagePrompt added in v0.0.5

func LoadMessagePrompt() (string, error)

LoadMessagePrompt reads the message prompt template from disk

func LoadSystemPrompt

func LoadSystemPrompt() (string, error)

LoadSystemPrompt reads the system prompt from disk

func MessagePromptPath added in v0.0.5

func MessagePromptPath() (string, error)

MessagePromptPath returns the path to the message prompt template file

func Path

func Path() (string, error)

Path returns the full path to config.yaml

func Save

func Save(cfg *Config) error

Save writes the config to disk

func SystemPromptPath

func SystemPromptPath() (string, error)

SystemPromptPath returns the path to the system prompt file

Types

type Config

type Config struct {
	Provider       string        `yaml:"provider"`
	Model          string        `yaml:"model"`
	DefaultPersona string        `yaml:"default_persona"`
	ContextEntries int           `yaml:"context_entries"` // number of previous entries to include for continuity
	Daemon         *DaemonConfig `yaml:"daemon,omitempty"`
}

Config holds application-level settings

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns sensible defaults

func Load

func Load() (*Config, error)

Load reads the config file, returning defaults if it doesn't exist

type DaemonConfig added in v0.0.3

type DaemonConfig struct {
	Rate       int      `yaml:"rate"`        // number of entries per period
	RatePeriod string   `yaml:"rate_period"` // "hour", "day", or "week"
	Personas   []string `yaml:"personas"`    // personas to randomly select from
}

DaemonConfig holds settings for autonomous entry generation

func DefaultDaemonConfig added in v0.0.3

func DefaultDaemonConfig() *DaemonConfig

DefaultDaemonConfig returns sensible defaults for daemon settings

Jump to

Keyboard shortcuts

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