config

package
v0.8.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TRUE bool = true

Functions

func WithConfig

func WithConfig(ctx context.Context, config *Config) context.Context

WithConfig returns a new context with the provided config

func WithFlags added in v0.8.0

func WithFlags(ctx context.Context, flags *StartupFlags) context.Context

Types

type Config

type Config struct {
	ChatGPTApiUrl                   string           `json:"chatGPTAPiUrl"`
	ProviderBaseUrl                 string           `json:"providerBaseUrl"`
	SystemMessage                   string           `json:"systemMessage"`
	DefaultModel                    string           `json:"defaultModel"`
	Provider                        string           `json:"provider"`
	ColorScheme                     util.ColorScheme `json:"colorScheme"`
	MaxAttachmentSizeMb             int              `json:"maxAttachmentSizeMb"`
	IncludeReasoningTokensInContext *bool            `json:"includeReasoningTokensInContext"`
	SessionExportDir                string           `json:"sessionExportDir"`
}

func CreateAndValidateConfig

func CreateAndValidateConfig(flags StartupFlags) Config

func FromContext

func FromContext(ctx context.Context) (*Config, bool)

FromContext extracts the config from the context, if available

type StartupFlags

type StartupFlags struct {
	Model           string
	Theme           string
	Provider        string
	ProviderUrl     string
	StartNewSession bool
	InitialPrompt   string
}

func FlagsFromContext added in v0.8.0

func FlagsFromContext(ctx context.Context) (*StartupFlags, bool)

Jump to

Keyboard shortcuts

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