Documentation
¶
Index ¶
- Constants
- func RegisterClipboardActions(r *Registry, h ClipboardHandlers)
- func RegisterGitOperations(r *Registry, h GitHandlers)
- func RegisterLogPaneActions(r *Registry, h LogHandlers)
- func RegisterNavigationActions(r *Registry, h NavigationHandlers)
- func RegisterSettingsActions(r *Registry, h SettingsHandlers)
- func RegisterStatusPaneActions(r *Registry, h StatusHandlers)
- func RegisterWorktreeActions(r *Registry, h WorktreeHandlers)
- type ClipboardHandlers
- type CommandAction
- type GitHandlers
- type LogHandlers
- type NavigationHandlers
- type PaletteItem
- type PaletteOptions
- type Registry
- type SettingsHandlers
- type StatusHandlers
- type WorktreeHandlers
Constants ¶
const ( IconWorktree = "" // Nerd Font: git branch IconCreate = "" // Nerd Font: plus IconGit = "" // Nerd Font: git IconStatus = "" // Nerd Font: file-diff IconLog = "" // Nerd Font: history IconSettings = "" // Nerd Font: cog IconCustom = "" // Nerd Font: terminal IconMultiplex = "" // Nerd Font: layers IconRecent = "" // Nerd Font: clock )
Section icons for command palette display.
Variables ¶
This section is empty.
Functions ¶
func RegisterClipboardActions ¶ added in v1.39.0
func RegisterClipboardActions(r *Registry, h ClipboardHandlers)
RegisterClipboardActions registers clipboard actions.
func RegisterGitOperations ¶
func RegisterGitOperations(r *Registry, h GitHandlers)
RegisterGitOperations registers git operations.
func RegisterLogPaneActions ¶
func RegisterLogPaneActions(r *Registry, h LogHandlers)
RegisterLogPaneActions registers log pane actions.
func RegisterNavigationActions ¶
func RegisterNavigationActions(r *Registry, h NavigationHandlers)
RegisterNavigationActions registers navigation actions.
func RegisterSettingsActions ¶
func RegisterSettingsActions(r *Registry, h SettingsHandlers)
RegisterSettingsActions registers settings actions.
func RegisterStatusPaneActions ¶
func RegisterStatusPaneActions(r *Registry, h StatusHandlers)
RegisterStatusPaneActions registers status pane actions.
func RegisterWorktreeActions ¶
func RegisterWorktreeActions(r *Registry, h WorktreeHandlers)
RegisterWorktreeActions registers worktree-related actions.
Types ¶
type ClipboardHandlers ¶ added in v1.39.0
type ClipboardHandlers struct {
CopyPath func() tea.Cmd
CopyBranch func() tea.Cmd
CopyPRURL func() tea.Cmd
}
ClipboardHandlers holds callbacks for clipboard actions.
type CommandAction ¶
type CommandAction struct {
ID string
Label string
Description string
Section string
Shortcut string // Keyboard shortcut display (e.g., "g")
Icon string // Category icon (Nerd Font)
Handler func() tea.Cmd
Available func() bool
}
CommandAction describes a command palette action.
type GitHandlers ¶
type GitHandlers struct {
ShowDiff func() tea.Cmd
Refresh func() tea.Cmd
Fetch func() tea.Cmd
Push func() tea.Cmd
Sync func() tea.Cmd
FetchPRData func() tea.Cmd
ViewCIChecks func() tea.Cmd
CIChecksAvailable func() bool
OpenPR func() tea.Cmd
OpenLazyGit func() tea.Cmd
RunCommand func() tea.Cmd
}
GitHandlers holds callbacks for git operations.
type LogHandlers ¶
LogHandlers holds callbacks for log pane actions.
type NavigationHandlers ¶
type NavigationHandlers struct {
}
NavigationHandlers holds callbacks for navigation actions.
type PaletteItem ¶
type PaletteItem struct {
ID string
Label string
Description string
IsSection bool
IsMRU bool
Shortcut string // Keyboard shortcut display (e.g., "g")
Icon string // Category icon (Nerd Font)
}
PaletteItem represents a palette entry.
func BuildPaletteItems ¶
func BuildPaletteItems(opts PaletteOptions) []PaletteItem
BuildPaletteItems builds palette items from actions and history.
type PaletteOptions ¶
type PaletteOptions struct {
MRUEnabled bool
MRULimit int
History []services.CommandPaletteUsage
Actions []CommandAction
CustomItems []PaletteItem
MRUSectionLabel string
}
PaletteOptions controls palette item building.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry stores command palette actions.
func (*Registry) Actions ¶
func (r *Registry) Actions() []CommandAction
Actions returns the registered actions in order.
func (*Registry) KnownActionIDs ¶ added in v1.43.0
KnownActionIDs returns all registered action IDs.
func (*Registry) Register ¶
func (r *Registry) Register(actions ...CommandAction)
Register adds actions to the registry.
func (*Registry) UpdateShortcuts ¶ added in v1.43.0
UpdateShortcuts overwrites action Shortcut fields with user-configured keys. It first clears any existing action that held the same shortcut key to prevent duplicate display in the palette.
type SettingsHandlers ¶
SettingsHandlers holds callbacks for settings actions.
type StatusHandlers ¶
type StatusHandlers struct {
StageFile func() tea.Cmd
CommitStaged func() tea.Cmd
CommitAll func() tea.Cmd
EditFile func() tea.Cmd
DeleteFile func() tea.Cmd
}
StatusHandlers holds callbacks for status pane actions.
type WorktreeHandlers ¶
type WorktreeHandlers struct {
Create func() tea.Cmd
Delete func() tea.Cmd
Rename func() tea.Cmd
EditMetadata func() tea.Cmd
Annotate func() tea.Cmd
SetIcon func() tea.Cmd
SetColor func() tea.Cmd
SetDescription func() tea.Cmd
SetTags func() tea.Cmd
BrowseTags func() tea.Cmd
Absorb func() tea.Cmd
Prune func() tea.Cmd
CreateFromCurrent func() tea.Cmd
CreateFromBranch func() tea.Cmd
CreateFromCommit func() tea.Cmd
CreateFromPR func() tea.Cmd
CreateFromIssue func() tea.Cmd
CreateFreeform func() tea.Cmd
}
WorktreeHandlers holds callbacks for worktree actions.