Documentation
¶
Index ¶
- Constants
- func GetSelectedModel(cfg *config.Config) models.Model
- func IsHidden(file string) (bool, error)
- type AttachmentAddedMsg
- type CloseCommandDialogMsg
- type CloseInitDialogMsg
- type CloseModelDialogMsg
- type CloseMultiArgumentsDialogMsg
- type CloseQuitMsg
- type CloseSessionDialogMsg
- type CloseThemeDialogMsg
- type Command
- type CommandDialog
- type CommandRunCustomMsg
- type CommandSelectedMsg
- type CompletionDialog
- type CompletionDialogCloseMsg
- type CompletionDialogCompleteItemMsg
- type CompletionItem
- type CompletionItemI
- type CompletionProvider
- type CompletionSelectedMsg
- type DirNode
- type FilePrickerKeyMap
- type FilepickerCmp
- type HelpCmp
- type InitDialogCmp
- type ModelDialog
- type ModelSelectedMsg
- type MultiArgumentsDialogCmp
- type PermissionAction
- type PermissionDialogCmp
- type PermissionResponseMsg
- type QuitDialog
- type SessionDialog
- type SessionSelectedMsg
- type ShowInitDialogMsg
- type ShowMultiArgumentsDialogMsg
- type ThemeChangedMsg
- type ThemeDialog
Constants ¶
const ( UserCommandPrefix = "user:" ProjectCommandPrefix = "project:" )
Command prefix constants
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AttachmentAddedMsg ¶ added in v0.0.40
type AttachmentAddedMsg struct {
Attachment message.Attachment
}
type CloseCommandDialogMsg ¶
type CloseCommandDialogMsg struct{}
CloseCommandDialogMsg is sent when the command dialog is closed
type CloseInitDialogMsg ¶
type CloseInitDialogMsg struct {
Initialize bool
}
CloseInitDialogMsg is a message that is sent when the init dialog is closed.
type CloseModelDialogMsg ¶ added in v0.0.35
type CloseModelDialogMsg struct{}
CloseModelDialogMsg is sent when a model is selected
type CloseMultiArgumentsDialogMsg ¶ added in v0.0.47
type CloseMultiArgumentsDialogMsg struct { Submit bool CommandID string Content string Args map[string]string }
CloseMultiArgumentsDialogMsg is a message that is sent when the multi-arguments dialog is closed.
type CloseQuitMsg ¶
type CloseQuitMsg struct{}
type CloseSessionDialogMsg ¶
type CloseSessionDialogMsg struct{}
CloseSessionDialogMsg is sent when the session dialog is closed
type CloseThemeDialogMsg ¶ added in v0.0.37
type CloseThemeDialogMsg struct{}
CloseThemeDialogMsg is sent when the theme dialog is closed
type Command ¶
Command represents a command that can be executed
func LoadCustomCommands ¶ added in v0.0.41
LoadCustomCommands loads custom commands from both XDG_CONFIG_HOME and project data directory
type CommandDialog ¶
CommandDialog interface for the command selection dialog
func NewCommandDialogCmp ¶
func NewCommandDialogCmp() CommandDialog
NewCommandDialogCmp creates a new command selection dialog
type CommandRunCustomMsg ¶ added in v0.0.41
type CommandRunCustomMsg struct { Content string Args map[string]string // Map of argument names to values }
CommandRunCustomMsg is sent when a custom command is executed
type CommandSelectedMsg ¶
type CommandSelectedMsg struct {
Command Command
}
CommandSelectedMsg is sent when a command is selected
type CompletionDialog ¶ added in v0.0.47
func NewCompletionDialogCmp ¶ added in v0.0.47
func NewCompletionDialogCmp(completionProvider CompletionProvider) CompletionDialog
type CompletionDialogCloseMsg ¶ added in v0.0.47
type CompletionDialogCloseMsg struct{}
type CompletionDialogCompleteItemMsg ¶ added in v0.0.47
type CompletionDialogCompleteItemMsg struct {
Value string
}
type CompletionItem ¶ added in v0.0.47
func (*CompletionItem) DisplayValue ¶ added in v0.0.47
func (ci *CompletionItem) DisplayValue() string
func (*CompletionItem) GetValue ¶ added in v0.0.47
func (ci *CompletionItem) GetValue() string
type CompletionItemI ¶ added in v0.0.47
type CompletionItemI interface { utilComponents.SimpleListItem GetValue() string DisplayValue() string }
func NewCompletionItem ¶ added in v0.0.47
func NewCompletionItem(completionItem CompletionItem) CompletionItemI
type CompletionProvider ¶ added in v0.0.47
type CompletionProvider interface { GetId() string GetEntry() CompletionItemI GetChildEntries(query string) ([]CompletionItemI, error) }
type CompletionSelectedMsg ¶ added in v0.0.47
type FilePrickerKeyMap ¶ added in v0.0.40
type FilepickerCmp ¶ added in v0.0.40
type FilepickerCmp interface { tea.Model ToggleFilepicker(showFilepicker bool) IsCWDFocused() bool }
func NewFilepickerCmp ¶ added in v0.0.40
func NewFilepickerCmp(app *app.App) FilepickerCmp
type HelpCmp ¶
func NewHelpCmp ¶
func NewHelpCmp() HelpCmp
type InitDialogCmp ¶
type InitDialogCmp struct {
// contains filtered or unexported fields
}
InitDialogCmp is a component that asks the user if they want to initialize the project.
func NewInitDialogCmp ¶
func NewInitDialogCmp() InitDialogCmp
NewInitDialogCmp creates a new InitDialogCmp.
func (InitDialogCmp) Bindings ¶
func (m InitDialogCmp) Bindings() []key.Binding
Bindings implements layout.Bindings.
func (*InitDialogCmp) SetSize ¶
func (m *InitDialogCmp) SetSize(width, height int)
SetSize sets the size of the component.
type ModelDialog ¶ added in v0.0.35
ModelDialog interface for the model selection dialog
func NewModelDialogCmp ¶ added in v0.0.35
func NewModelDialogCmp() ModelDialog
type ModelSelectedMsg ¶ added in v0.0.35
ModelSelectedMsg is sent when a model is selected
type MultiArgumentsDialogCmp ¶ added in v0.0.47
type MultiArgumentsDialogCmp struct {
// contains filtered or unexported fields
}
MultiArgumentsDialogCmp is a component that asks the user for multiple command arguments.
func NewMultiArgumentsDialogCmp ¶ added in v0.0.47
func NewMultiArgumentsDialogCmp(commandID, content string, argNames []string) MultiArgumentsDialogCmp
NewMultiArgumentsDialogCmp creates a new MultiArgumentsDialogCmp.
func (MultiArgumentsDialogCmp) Bindings ¶ added in v0.0.47
func (m MultiArgumentsDialogCmp) Bindings() []key.Binding
Bindings implements layout.Bindings.
func (MultiArgumentsDialogCmp) Init ¶ added in v0.0.47
func (m MultiArgumentsDialogCmp) Init() tea.Cmd
Init implements tea.Model.
func (*MultiArgumentsDialogCmp) SetSize ¶ added in v0.0.47
func (m *MultiArgumentsDialogCmp) SetSize(width, height int)
SetSize sets the size of the component.
func (MultiArgumentsDialogCmp) View ¶ added in v0.0.47
func (m MultiArgumentsDialogCmp) View() string
View implements tea.Model.
type PermissionAction ¶
type PermissionAction string
const ( PermissionAllow PermissionAction = "allow" PermissionAllowForSession PermissionAction = "allow_session" PermissionDeny PermissionAction = "deny" )
Permission responses
type PermissionDialogCmp ¶
type PermissionDialogCmp interface { tea.Model layout.Bindings SetPermissions(permission permission.PermissionRequest) tea.Cmd }
PermissionDialogCmp interface for permission dialog component
func NewPermissionDialogCmp ¶
func NewPermissionDialogCmp() PermissionDialogCmp
type PermissionResponseMsg ¶
type PermissionResponseMsg struct { Permission permission.PermissionRequest Action PermissionAction }
PermissionResponseMsg represents the user's response to a permission request
type QuitDialog ¶
func NewQuitCmp ¶
func NewQuitCmp() QuitDialog
type SessionDialog ¶
type SessionDialog interface { tea.Model layout.Bindings SetSessions(sessions []session.Session) SetSelectedSession(sessionID string) }
SessionDialog interface for the session switching dialog
func NewSessionDialogCmp ¶
func NewSessionDialogCmp() SessionDialog
NewSessionDialogCmp creates a new session switching dialog
type SessionSelectedMsg ¶
SessionSelectedMsg is sent when a session is selected
type ShowInitDialogMsg ¶
type ShowInitDialogMsg struct {
Show bool
}
ShowInitDialogMsg is a message that is sent to show the init dialog.
type ShowMultiArgumentsDialogMsg ¶ added in v0.0.47
ShowMultiArgumentsDialogMsg is a message that is sent to show the multi-arguments dialog.
type ThemeChangedMsg ¶ added in v0.0.37
type ThemeChangedMsg struct {
ThemeName string
}
ThemeChangedMsg is sent when the theme is changed
type ThemeDialog ¶ added in v0.0.37
ThemeDialog interface for the theme switching dialog
func NewThemeDialogCmp ¶ added in v0.0.37
func NewThemeDialogCmp() ThemeDialog
NewThemeDialogCmp creates a new theme switching dialog