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
)
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" )
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.