Documentation
¶
Index ¶
- type AIConfig
- type AIMessageEntry
- type AIModelConfig
- type AISessionData
- type AISessionEntry
- type AISessionStore
- type AISettings
- type AppSettings
- type ConnectionStore
- type CustomTerminalTheme
- type HistoryEntry
- type KeyBinding
- type LocalState
- type LocalStateStore
- type PasswordStore
- type QuickCommand
- type QuickCommandData
- type QuickCommandGroup
- type QuickCommandsStore
- type RecentStore
- type SFTPBookmarks
- type SettingsStore
- type TerminalHistoryData
- type TerminalHistoryStore
- type TerminalSettings
- type TerminalThemeColors
- type TunnelStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIConfig ¶
type AIConfig struct {
APIKey string `json:"apiKey"`
BaseURL string `json:"baseURL"`
Model string `json:"model"`
}
AIConfig is the legacy flat AI config type, kept for Wails binding compatibility. New code should use AppSettings.AI (active model from AISettings).
type AIMessageEntry ¶
type AIMessageEntry struct {
ID string `json:"id"`
Role string `json:"role"`
Content string `json:"content"`
ToolCallID string `json:"tool_call_id,omitempty"`
ToolCalls []interface{} `json:"tool_calls,omitempty"`
PendingTools []interface{} `json:"pendingTools,omitempty"`
RawAPIMsg string `json:"_rawApiMsg,omitempty"`
}
type AIModelConfig ¶
type AISessionData ¶
type AISessionData struct {
Sessions []AISessionEntry `json:"sessions"`
CurrentSessionID string `json:"currentSessionId"`
}
type AISessionEntry ¶
type AISessionEntry struct {
ID string `json:"id"`
Name string `json:"name"`
CreatedAt int64 `json:"createdAt"`
UpdatedAt int64 `json:"updatedAt"`
Messages []AIMessageEntry `json:"messages"`
}
type AISessionStore ¶
type AISessionStore struct {
// contains filtered or unexported fields
}
func NewAISessionStore ¶
func NewAISessionStore() (*AISessionStore, error)
func (*AISessionStore) Load ¶
func (s *AISessionStore) Load() (AISessionData, error)
func (*AISessionStore) Save ¶
func (s *AISessionStore) Save(data AISessionData) error
type AISettings ¶
type AISettings struct {
MaxTurns *int `json:"maxTurns"`
Models []AIModelConfig `json:"models"`
ActiveModelID string `json:"activeModelId"`
}
type AppSettings ¶
type AppSettings struct {
Theme string `json:"theme"`
Language string `json:"language"`
Terminal TerminalSettings `json:"terminal"`
AI AISettings `json:"ai"`
Keyboard map[string]KeyBinding `json:"keyboard"`
AutoCheckUpdate *bool `json:"autoCheckUpdate"`
SFTPBookmarks SFTPBookmarks `json:"sftpBookmarks"`
CustomTerminalThemes []CustomTerminalTheme `json:"customTerminalThemes"`
DefaultLocalShell string `json:"defaultLocalShell"`
}
type ConnectionStore ¶
type ConnectionStore struct {
// contains filtered or unexported fields
}
func NewConnectionStore ¶
func NewConnectionStore() (*ConnectionStore, error)
func (*ConnectionStore) Load ¶
func (s *ConnectionStore) Load() (session.ConnectionStoreData, error)
func (*ConnectionStore) Save ¶
func (s *ConnectionStore) Save(data session.ConnectionStoreData) error
func (*ConnectionStore) SetPasswordStore ¶
func (s *ConnectionStore) SetPasswordStore(ps PasswordStore)
SetPasswordStore sets the external password store. Once set, passwords are written to the store and cleared from the JSON file on save.
type CustomTerminalTheme ¶ added in v1.3.0
type CustomTerminalTheme struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"` // "dark" | "light"
Colors TerminalThemeColors `json:"colors"`
}
CustomTerminalTheme is a user-defined terminal color scheme, stored alongside (not inside) TerminalSettings since a theme is a reusable resource, not a single terminal session's property.
type HistoryEntry ¶
type KeyBinding ¶ added in v1.1.1
type LocalState ¶ added in v1.1.2
type LocalState struct {
SidebarVisible bool `json:"sidebarVisible"`
AISidebarVisible bool `json:"aiSidebarVisible"`
CollapsedGroupIds []string `json:"collapsedGroupIds"`
WindowX int `json:"windowX"`
WindowY int `json:"windowY"`
WindowWidth int `json:"windowWidth"`
WindowHeight int `json:"windowHeight"`
WindowMaximised bool `json:"windowMaximised"`
}
type LocalStateStore ¶ added in v1.1.2
type LocalStateStore struct {
// contains filtered or unexported fields
}
func NewLocalStateStore ¶ added in v1.1.2
func NewLocalStateStore(configDir string) *LocalStateStore
func (*LocalStateStore) Load ¶ added in v1.1.2
func (s *LocalStateStore) Load() (LocalState, error)
func (*LocalStateStore) Save ¶ added in v1.1.2
func (s *LocalStateStore) Save(state LocalState) error
type PasswordStore ¶
type PasswordStore interface {
GetPassword(connID string) (string, error)
SetPassword(connID, password string) error
DeletePassword(connID string) error
GetModelAPIKey(modelID string) (string, error)
SetModelAPIKey(modelID, apiKey string) error
DeleteModelAPIKey(modelID string) error
}
PasswordStore is the interface for reading/writing connection passwords and AI model API keys. Implementations store secrets externally (e.g. OS keychain).
type QuickCommand ¶
type QuickCommandData ¶
type QuickCommandData struct {
Version int `json:"version"`
Groups []QuickCommandGroup `json:"groups"`
Commands []QuickCommand `json:"commands"`
}
type QuickCommandGroup ¶
type QuickCommandsStore ¶
type QuickCommandsStore struct {
// contains filtered or unexported fields
}
func NewQuickCommandsStore ¶
func NewQuickCommandsStore(configDir string) *QuickCommandsStore
func (*QuickCommandsStore) Load ¶
func (s *QuickCommandsStore) Load() (QuickCommandData, error)
func (*QuickCommandsStore) Save ¶
func (s *QuickCommandsStore) Save(data QuickCommandData) error
type RecentStore ¶ added in v1.2.2
type RecentStore struct {
// contains filtered or unexported fields
}
func NewRecentStore ¶ added in v1.2.2
func NewRecentStore(configDir string) *RecentStore
func (*RecentStore) GetAll ¶ added in v1.2.2
func (s *RecentStore) GetAll() []string
func (*RecentStore) Load ¶ added in v1.2.2
func (s *RecentStore) Load() ([]string, error)
func (*RecentStore) Record ¶ added in v1.2.2
func (s *RecentStore) Record(id string) error
type SFTPBookmarks ¶ added in v1.2.1
type SettingsStore ¶
type SettingsStore struct {
// contains filtered or unexported fields
}
func NewSettingsStore ¶
func NewSettingsStore() (*SettingsStore, error)
func (*SettingsStore) Load ¶
func (s *SettingsStore) Load() (AppSettings, error)
func (*SettingsStore) Save ¶
func (s *SettingsStore) Save(settings AppSettings) error
func (*SettingsStore) SetPasswordStore ¶
func (s *SettingsStore) SetPasswordStore(ps PasswordStore)
type TerminalHistoryData ¶
type TerminalHistoryData struct {
Entries []HistoryEntry `json:"entries"`
}
type TerminalHistoryStore ¶
type TerminalHistoryStore struct {
// contains filtered or unexported fields
}
func NewTerminalHistoryStore ¶
func NewTerminalHistoryStore(configDir string) *TerminalHistoryStore
func (*TerminalHistoryStore) DeleteByIDs ¶
func (s *TerminalHistoryStore) DeleteByIDs(ids []string) error
func (*TerminalHistoryStore) Load ¶
func (s *TerminalHistoryStore) Load() ([]HistoryEntry, error)
func (*TerminalHistoryStore) Save ¶
func (s *TerminalHistoryStore) Save(entries []HistoryEntry) error
type TerminalSettings ¶
type TerminalSettings struct {
Theme string `json:"theme"`
FontFamily string `json:"fontFamily"`
FontSize int `json:"fontSize"`
SelectionAction string `json:"selectionAction"`
RightClickAction string `json:"rightClickAction"`
MaxHistoryLines int `json:"maxHistoryLines"`
SmartCompletion *bool `json:"smartCompletion"`
HighlightEnabled *bool `json:"highlightEnabled"`
}
type TerminalThemeColors ¶ added in v1.3.0
type TerminalThemeColors struct {
Background string `json:"background"`
Foreground string `json:"foreground"`
Cursor string `json:"cursor"`
Selection string `json:"selection"`
Black string `json:"black"`
Red string `json:"red"`
Green string `json:"green"`
Yellow string `json:"yellow"`
Blue string `json:"blue"`
Magenta string `json:"magenta"`
Cyan string `json:"cyan"`
White string `json:"white"`
BrightBlack string `json:"brightBlack"`
BrightRed string `json:"brightRed"`
BrightGreen string `json:"brightGreen"`
BrightYellow string `json:"brightYellow"`
BrightBlue string `json:"brightBlue"`
BrightMagenta string `json:"brightMagenta"`
BrightCyan string `json:"brightCyan"`
BrightWhite string `json:"brightWhite"`
}
TerminalThemeColors mirrors xterm.js's ITheme shape: the 4 base colors plus the 16 ANSI colors, all as hex strings.
type TunnelStore ¶ added in v1.4.0
type TunnelStore struct {
// contains filtered or unexported fields
}
TunnelStore persists the user's SSH tunnel definitions to tunnels.json in the app config dir, mirroring QuickCommandsStore.
func NewTunnelStore ¶ added in v1.4.0
func NewTunnelStore(configDir string) *TunnelStore
func (*TunnelStore) Load ¶ added in v1.4.0
func (s *TunnelStore) Load() (session.TunnelStoreData, error)
func (*TunnelStore) Save ¶ added in v1.4.0
func (s *TunnelStore) Save(data session.TunnelStoreData) error