Documentation
¶
Index ¶
- Constants
- type Config
- type ConfigFile
- type DebugConfig
- type FileDialogConfig
- type Help
- type History
- type PrinterConfig
- type Profile
- type ProfileMeta
- type PromptConfig
- type Shortcut
- type Theme
- type Themes
- type UIConfig
- type VueDevToolsConfig
- type WebKitInspectorConfig
- type WindowBackgroundColor
- type WindowConfig
Constants ¶
View Source
const ( LogLevelDebug = "debug" LogLevelInfo = "info" LogLevelWarn = "warn" LogLevelError = "error" )
View Source
const ( PrinterFormatPlain = "plain" PrinterFormatJSON = "json" PrinterTargetOut = "stdout" PrinterTargetErr = "stderr" )
View Source
const ( ThemeDark = "dark" ThemeLight = "light" ThemeSystem = "system" )
View Source
const ( TranslucentNever = "never" TranslucentEver = "ever" TranslucentHover = "hover" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
ConfigFile `yaml:",inline"`
MainProfile Profile `yaml:",inline,omitempty"`
DebugConfig DebugConfig `yaml:",inline,omitempty"`
ActiveProfile string `yaml:"active-profile,omitempty" short:"P" usage:"The active profile name"`
Profiles map[string]*Profile `yaml:"profiles,omitempty" usage:"Configuration profiles. Each profile has the same structure as the main configuration: "`
Themes Themes `yaml:"themes,omitempty" usage:"Theme settings for the application: "`
Version bool `yaml:"version,omitempty" short:"v" usage:"Show the version"`
HttpAddress string `` /* 143-byte string literal not displayed */
Help Help `yaml:",inline,omitempty"`
}
func (*Config) GetActiveProfile ¶
func (*Config) GetProfiles ¶
func (c *Config) GetProfiles() map[string]ProfileMeta
type ConfigFile ¶
type ConfigFile struct {
Path string `yaml:"config-file,omitempty" short:"c" usage:"Path to the configuration yaml file"`
}
type DebugConfig ¶
type DebugConfig struct {
LogLevel string `yaml:"log-level,omitempty"`
LogLevelParsed *slog.Level `yaml:"-"`
PprofAddress string `yaml:"pprof-address,omitempty" usage:"Address for the pprof server (only available for debug binary)"`
VueDevTools VueDevToolsConfig `yaml:"vue-dev-tools,omitempty"`
WebKit WebKitInspectorConfig `yaml:"webkit,omitempty" usage:"Webkit debug configuration (only available for debug binary): "`
DisableCrashDetection bool `` /* 147-byte string literal not displayed */
}
func (*DebugConfig) GetUsage ¶
func (d *DebugConfig) GetUsage(field string) string
func (*DebugConfig) SetDefaults ¶
func (d *DebugConfig) SetDefaults()
func (*DebugConfig) Validate ¶
func (d *DebugConfig) Validate() error
type FileDialogConfig ¶
type FileDialogConfig struct {
DefaultDirectory string `yaml:"default-dir,omitempty" usage:"The default directory for the file dialog"`
ShowHiddenFiles *bool `yaml:"show-hidden,omitempty" usage:"Should the file dialog show hidden files"`
CanCreateDirectories *bool `yaml:"can-create-dirs,omitempty" usage:"Should the file dialog be able to create directories"`
ResolveAliases *bool `yaml:"resolve-aliases,omitempty" usage:"Should the file dialog resolve aliases"`
TreatPackagesAsDirectories *bool `yaml:"treat-packages-as-dirs,omitempty" usage:"Should the file dialog treat packages as directories"`
FilterDisplay []string `` /* 129-byte string literal not displayed */
FilterPattern []string `yaml:"filter-pattern,omitempty" usage:"The filter patterns for the file dialog. For example: \"*.jpg;*.png\""`
}
func (*FileDialogConfig) SetDefaults ¶
func (c *FileDialogConfig) SetDefaults()
func (*FileDialogConfig) Validate ¶
func (c *FileDialogConfig) Validate() error
type Help ¶
type Help struct {
Arg bool `yaml:"help,omitempty" short:"h" usage:"Show this help"`
Env bool `yaml:"help-env,omitempty" usage:"Show help for environment variables"`
Yaml bool `yaml:"help-config,omitempty" usage:"Show help for config file"`
Styles bool `yaml:"help-styles,omitempty" usage:"Show help of code styles"`
Expr bool `yaml:"help-expression,omitempty" usage:"Show help for expressions"`
Tool bool `yaml:"help-tool,omitempty" usage:"Show help for tools"`
GenYaml bool `yaml:"config-template,omitempty" usage:"Generate yaml template with default values and all possible options"`
DumpYaml bool `yaml:"config-dump,omitempty" usage:"Dump the current configuration as yaml"`
}
type History ¶
type History struct {
Path *string `yaml:"path,omitempty" usage:"The path to the history file. If empty, no history will be used"`
}
func (*History) SetDefaults ¶
func (h *History) SetDefaults()
type PrinterConfig ¶
type PrinterConfig struct {
Targets []io.WriteCloser `yaml:"-"`
TargetsRaw []string `yaml:"targets,omitempty"`
Format string `yaml:"format,omitempty" short:"f"`
}
func (*PrinterConfig) Close ¶
func (p *PrinterConfig) Close()
func (*PrinterConfig) GetUsage ¶
func (p *PrinterConfig) GetUsage(field string) string
func (*PrinterConfig) SetDefaults ¶
func (p *PrinterConfig) SetDefaults()
func (*PrinterConfig) Validate ¶
func (p *PrinterConfig) Validate() error
type Profile ¶
type Profile struct {
Meta ProfileMeta `yaml:",inline,omitempty"`
Printer PrinterConfig `yaml:"print,omitempty"`
LLM llm.LLMConfig `yaml:"llm,omitempty"`
UI UIConfig `yaml:"ui,omitempty"`
History History `yaml:"history,omitempty"`
RestartShortcut Shortcut `yaml:"restart-shortcut,omitempty" usage:"The shortcut for triggering a restart: "`
}
func (*Profile) SetDefaults ¶
func (c *Profile) SetDefaults()
type ProfileMeta ¶
type PromptConfig ¶
type PromptConfig struct {
MinRows *uint `yaml:"min-rows,omitempty" usage:"The minimal number of rows the prompt should have"`
MaxRows *uint `yaml:"max-rows,omitempty" usage:"The maximal number of rows the prompt should have"`
PinTop *bool `yaml:"pin-top,omitempty" usage:"Pin the prompt input at the top of the window (otherwise pin at the bottom)"`
SubmitShortcut Shortcut `yaml:"submit,omitempty" usage:"The shortcut for submit the prompt: "`
}
func (*PromptConfig) SetDefaults ¶
func (p *PromptConfig) SetDefaults()
func (*PromptConfig) Validate ¶
func (p *PromptConfig) Validate() error
type Shortcut ¶
type Themes ¶ added in v0.24.1
type Themes struct {
Dark *Theme `yaml:"dark,omitempty" json:"dark,omitempty" usage:"Dark theme "`
Light *Theme `yaml:"light,omitempty" json:"light,omitempty" usage:"Light theme "`
Custom map[string]Theme `yaml:"custom,omitempty" json:"custom,omitempty" usage:"Custom themes (See https://vuetifyjs.com/en/features/theme/) "`
}
func (*Themes) SetDefaults ¶ added in v0.24.1
func (t *Themes) SetDefaults()
type UIConfig ¶
type UIConfig struct {
Window WindowConfig `yaml:"window,omitempty"`
Prompt PromptConfig `yaml:"prompt,omitempty"`
FileDialog FileDialogConfig `yaml:"file-dialog,omitempty"`
Stream *bool `yaml:"stream,omitempty" short:"s" usage:"Should the output be streamed"`
QuitShortcut Shortcut `yaml:"quit,omitempty" usage:"The shortcut for quitting the application: "`
Theme string `yaml:"theme,omitempty"`
CodeStyle string `yaml:"code-style,omitempty" usage:"The code style to use"`
Language string `yaml:"lang,omitempty" usage:"The language to use"`
}
func (*UIConfig) SetDefaults ¶
func (u *UIConfig) SetDefaults()
type VueDevToolsConfig ¶
type VueDevToolsConfig struct {
Host string `yaml:"host,omitempty" usage:"The host of the vue dev tools server. If empty the dev tools will be disabled"`
Port int `yaml:"port,omitempty" usage:"The port of the vue dev tools server"`
}
func (*VueDevToolsConfig) SetDefaults ¶
func (v *VueDevToolsConfig) SetDefaults()
type WebKitInspectorConfig ¶
type WindowBackgroundColor ¶
type WindowConfig ¶
type WindowConfig struct {
Title string `yaml:"title,omitempty" usage:"The window title"`
InitialWidth common.NumberContainer `yaml:"init-width,omitempty" usage:"Expression: The (initial) width of the window"`
MaxHeight common.NumberContainer `yaml:"max-height,omitempty" usage:"Expression: The maximal height of the chat response area"`
InitialPositionX common.NumberContainer `yaml:"init-pos-x,omitempty" usage:"Expression: The (initial) x-position of the window"`
InitialPositionY common.NumberContainer `` /* 165-byte string literal not displayed */
InitialZoom common.NumberContainer `yaml:"init-zoom,omitempty" usage:"Expression: The (initial) zoom level of the window"`
BackgroundColor WindowBackgroundColor `yaml:"bg-color,omitempty" usage:"The background color of the window: "`
StartState *int `yaml:"start-state,omitempty"`
AlwaysOnTop *bool `yaml:"always-on-top,omitempty" usage:"Should the window be always on top"`
ShowTitleBar *bool `yaml:"show-title-bar,omitempty" usage:"Should the window show the title-bar"`
TitleBarHeight *int `yaml:"title-bar-height,omitempty,omitempty" usage:"The height of the title bar"`
GrowTop *bool `yaml:"grow-top,omitempty" usage:"Should the window grow from bottom to the top"`
Frameless *bool `yaml:"frameless,omitempty" usage:"Should the window be frameless"`
Resizeable *bool `yaml:"resizeable,omitempty" usage:"Should the window be resizeable"`
Translucent string `yaml:"translucent,omitempty"`
}
func (*WindowConfig) GetUsage ¶
func (w *WindowConfig) GetUsage(field string) string
func (*WindowConfig) ResolveExpressions ¶
func (w *WindowConfig) ResolveExpressions(screen expression.Screen) (err error)
func (*WindowConfig) SetDefaults ¶
func (w *WindowConfig) SetDefaults()
func (*WindowConfig) Validate ¶
func (w *WindowConfig) Validate() error
Source Files
¶
Click to show internal directories.
Click to hide internal directories.