Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidType = fmt.Errorf("not a valid Type, try [%s]", strings.Join(_TypeNames, ", "))
Functions ¶
func IsConfigAction ¶
IsConfigAction reports whether t is a valid action for use in YAML config.
Types ¶
type Action ¶
type Action struct {
Type Type
Key string
Help string
Confirm string // Non-empty if confirmation required
ShellCmd string // For shell actions, the rendered command
ShellDir string // Working directory for TypeShell (empty = hive process cwd)
SpawnWindows *SpawnWindowsPayload // For TypeSpawnWindows
SessionID string
SessionName string // Session display name (for tmux actions)
SessionPath string
SessionRemote string // Session remote URL (for tmux actions)
TmuxWindow string // Target tmux window name (for tmux actions)
Silent bool // Skip loading popup for fast commands
Exit bool // Exit hive after command completes
Err error // Non-nil if action resolution failed (e.g., template error)
}
Action represents a resolved keybinding or command action ready for execution.
func (Action) NeedsConfirm ¶
NeedsConfirm returns true if the action requires user confirmation.
type NewSessionRequest ¶
type NewSessionRequest struct {
Name string // Rendered session name
Remote string // Remote URL; empty = inherit from selected session
// ShCmd is an optional shell command run in the new session's directory after the git clone
// and before windows are opened. Non-zero exit aborts window creation.
ShCmd string
}
NewSessionRequest carries parameters for creating a new Hive session before spawning windows.
type SpawnWindowsPayload ¶
type SpawnWindowsPayload struct {
// Optional sh: command to run before opening windows in same-session mode.
// For new-session mode, ShCmd lives on NewSession.ShCmd instead.
ShCmd string
ShDir string // Working directory for ShCmd (same-session mode only)
// Windows to open.
Windows []WindowSpec
// Target for same-session mode (TmuxTarget = existing session's tmux name).
TmuxTarget string
SessionDir string // Working directory fallback for window dir resolution
Background bool
// New-session mode: if non-nil, a Hive session is created before windows are opened.
// ShCmd is NOT used in this mode; use NewSession.ShCmd instead.
NewSession *NewSessionRequest
}
SpawnWindowsPayload is the execution payload for TypeSpawnWindows actions.
type Type ¶
type Type string
Type identifies the kind of action a keybinding or command triggers.
ENUM(
None Recycle Delete Shell TmuxOpen TmuxStart FilterAll FilterActive FilterApproval FilterReady DocReview NewSession SetTheme Notifications RenameSession NextActive PrevActive DeleteRecycledBatch SpawnWindows HiveInfo HiveDoctor GroupSet GroupToggle TodoPanel TasksRefresh TasksFilter TasksCopyID TasksTogglePreview TasksSelectRepo TasksSetOpen TasksSetInProgress TasksSetDone TasksSetCancelled TasksDelete TasksPrune ViewTasks DocsCopyPath DocsCopyRelPath DocsCopyContents DocsOpen DocsTogglePreview DocsToggleTree DocsSelectRepo
)
const ( // TypeNone is a Type of type None. TypeNone Type = "None" // TypeRecycle is a Type of type Recycle. TypeRecycle Type = "Recycle" // TypeDelete is a Type of type Delete. TypeDelete Type = "Delete" // TypeShell is a Type of type Shell. TypeShell Type = "Shell" // TypeTmuxOpen is a Type of type TmuxOpen. TypeTmuxOpen Type = "TmuxOpen" // TypeTmuxStart is a Type of type TmuxStart. TypeTmuxStart Type = "TmuxStart" // TypeFilterAll is a Type of type FilterAll. TypeFilterAll Type = "FilterAll" // TypeFilterActive is a Type of type FilterActive. TypeFilterActive Type = "FilterActive" // TypeFilterApproval is a Type of type FilterApproval. TypeFilterApproval Type = "FilterApproval" // TypeFilterReady is a Type of type FilterReady. TypeFilterReady Type = "FilterReady" // TypeDocReview is a Type of type DocReview. TypeDocReview Type = "DocReview" // TypeNewSession is a Type of type NewSession. TypeNewSession Type = "NewSession" // TypeSetTheme is a Type of type SetTheme. TypeSetTheme Type = "SetTheme" // TypeNotifications is a Type of type Notifications. TypeNotifications Type = "Notifications" // TypeRenameSession is a Type of type RenameSession. TypeRenameSession Type = "RenameSession" // TypeNextActive is a Type of type NextActive. TypeNextActive Type = "NextActive" // TypePrevActive is a Type of type PrevActive. TypePrevActive Type = "PrevActive" // TypeDeleteRecycledBatch is a Type of type DeleteRecycledBatch. TypeDeleteRecycledBatch Type = "DeleteRecycledBatch" // TypeSpawnWindows is a Type of type SpawnWindows. TypeSpawnWindows Type = "SpawnWindows" // TypeHiveInfo is a Type of type HiveInfo. TypeHiveInfo Type = "HiveInfo" // TypeHiveDoctor is a Type of type HiveDoctor. TypeHiveDoctor Type = "HiveDoctor" // TypeGroupSet is a Type of type GroupSet. TypeGroupSet Type = "GroupSet" // TypeGroupToggle is a Type of type GroupToggle. TypeGroupToggle Type = "GroupToggle" // TypeTodoPanel is a Type of type TodoPanel. TypeTodoPanel Type = "TodoPanel" // TypeTasksRefresh is a Type of type TasksRefresh. TypeTasksRefresh Type = "TasksRefresh" // TypeTasksFilter is a Type of type TasksFilter. TypeTasksFilter Type = "TasksFilter" // TypeTasksCopyID is a Type of type TasksCopyID. TypeTasksCopyID Type = "TasksCopyID" // TypeTasksTogglePreview is a Type of type TasksTogglePreview. TypeTasksTogglePreview Type = "TasksTogglePreview" // TypeTasksSelectRepo is a Type of type TasksSelectRepo. TypeTasksSelectRepo Type = "TasksSelectRepo" // TypeTasksSetOpen is a Type of type TasksSetOpen. TypeTasksSetOpen Type = "TasksSetOpen" // TypeTasksSetInProgress is a Type of type TasksSetInProgress. TypeTasksSetInProgress Type = "TasksSetInProgress" // TypeTasksSetDone is a Type of type TasksSetDone. TypeTasksSetDone Type = "TasksSetDone" // TypeTasksSetCancelled is a Type of type TasksSetCancelled. TypeTasksSetCancelled Type = "TasksSetCancelled" // TypeTasksDelete is a Type of type TasksDelete. TypeTasksDelete Type = "TasksDelete" // TypeTasksPrune is a Type of type TasksPrune. TypeTasksPrune Type = "TasksPrune" // TypeViewTasks is a Type of type ViewTasks. TypeViewTasks Type = "ViewTasks" // TypeDocsCopyPath is a Type of type DocsCopyPath. TypeDocsCopyPath Type = "DocsCopyPath" // TypeDocsCopyRelPath is a Type of type DocsCopyRelPath. TypeDocsCopyRelPath Type = "DocsCopyRelPath" // TypeDocsCopyContents is a Type of type DocsCopyContents. TypeDocsCopyContents Type = "DocsCopyContents" // TypeDocsOpen is a Type of type DocsOpen. TypeDocsOpen Type = "DocsOpen" // TypeDocsTogglePreview is a Type of type DocsTogglePreview. TypeDocsTogglePreview Type = "DocsTogglePreview" // TypeDocsToggleTree is a Type of type DocsToggleTree. TypeDocsToggleTree Type = "DocsToggleTree" // TypeDocsSelectRepo is a Type of type DocsSelectRepo. TypeDocsSelectRepo Type = "DocsSelectRepo" )
func (*Type) AppendText ¶
AppendText appends the textual representation of itself to the end of b (allocating a larger slice if necessary) and returns the updated slice.
Implementations must not retain b, nor mutate any bytes within b[:len(b)].
func (Type) IsValid ¶
IsValid provides a quick way to determine if the typed value is part of the allowed enumerated values
func (Type) MarshalText ¶
MarshalText implements the text marshaller method.
func (*Type) UnmarshalText ¶
UnmarshalText implements the text unmarshaller method.