Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AgentConfig ¶
type AgentConfig struct {
Default string `toml:"default"`
Timeout string `toml:"timeout"`
Transport string `toml:"transport"` // "stdio" or "http"
Command string `toml:"command"` // For stdio transport
Args []string `toml:"args"` // For stdio transport
URL string `toml:"url"` // For http transport (e.g., "http://localhost:11434/api/generate")
Model string `toml:"model"` // For http transport (e.g., "codellama")
}
type ClipboardConfig ¶
type ClipboardConfig struct {
MaxOutputSize string `toml:"max_output_size"`
BufferSize int `toml:"buffer_size"`
PreserveColors bool `toml:"preserve_colors"`
}
func (*ClipboardConfig) ParseMaxOutputSize ¶
func (c *ClipboardConfig) ParseMaxOutputSize() (int64, error)
ParseMaxOutputSize parses the MaxOutputSize string and returns bytes.
type CompletionsConfig ¶
type Config ¶
type Config struct {
Shell ShellConfig `toml:"shell"`
Input InputConfig `toml:"input"`
Prompt PromptConfig `toml:"prompt"`
Agent AgentConfig `toml:"agent"`
History HistoryConfig `toml:"history"`
Completions CompletionsConfig `toml:"completions"`
Clipboard ClipboardConfig `toml:"clipboard"`
Prediction PredictionConfig `toml:"prediction"`
}
Config represents the Hash shell configuration.
type HistoryConfig ¶
type InputConfig ¶
type InputConfig struct {
Keybindings string `toml:"keybindings"` // "helix", "emacs", "vim"
Gutter bool `toml:"gutter"` // Show visual indicator for multiline
MaxPasteSize string `toml:"max_paste_size"` // Maximum paste size (e.g., "10MB")
}
InputConfig configures the input/editing mode.
func (*InputConfig) ParseMaxPasteSize ¶ added in v0.4.3
func (c *InputConfig) ParseMaxPasteSize() uint
ParseMaxPasteSize parses the MaxPasteSize string and returns bytes. Returns default of 10MB if not set or invalid.
type PredictionConfig ¶
type PredictionConfig struct {
Enabled bool `toml:"enabled"`
AcceptKeys []string `toml:"accept_keys"`
ConfidenceThreshold float64 `toml:"confidence_threshold"`
PathMinCount int `toml:"path_min_count"`
PathRecencyHours int `toml:"path_recency_boost_hours"`
}
PredictionConfig configures command and path prediction.
type PromptConfig ¶
type ShellConfig ¶
type ShellConfig struct {
Editor string `toml:"editor"`
Keybindings string `toml:"keybindings"`
InitCommands []string `toml:"init_commands"` // Legacy: run always
ProfileCommands []string `toml:"profile"` // Run on login shells
RCCommands []string `toml:"rc_commands"` // Run on interactive shells
DisableBuiltins []string `toml:"disable_builtins"` // e.g., ["cd"] to use zoxide
StartupFiles StartupFilesConfig `toml:"startup_files"`
}
type StartupFilesConfig ¶
type StartupFilesConfig struct {
Login []string `toml:"login"` // Files to source for login shells
Interactive []string `toml:"interactive"` // Files to source for interactive shells
}
StartupFilesConfig specifies which files to source at startup.
Click to show internal directories.
Click to hide internal directories.