commands

package
v1.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GetSessionCmd = &cobra.Command{
	Use:   "get-session [name]",
	Short: "Get information about a session",
	Args:  cobra.ExactArgs(1),
	RunE: func(cmd *cobra.Command, args []string) error {
		client := sessionv1connect.NewSessionServiceClient(
			http.DefaultClient,
			"http://localhost:8080",
		)
		req := &connect.Request[sessionv1.GetSessionRequest]{
			Msg: &sessionv1.GetSessionRequest{
				Id: args[0],
			},
		}
		resp, err := client.GetSession(context.Background(), req)
		if err != nil {
			return fmt.Errorf("could not get session: %w", err)
		}

		jsonData, err := json.MarshalIndent(resp.Msg.Session, "", "  ")
		if err != nil {
			return fmt.Errorf("could not marshal session data to json: %w", err)
		}
		fmt.Println(string(jsonData))

		return nil
	},
}

Functions

func AttachPTYCommand

func AttachPTYCommand(ctx *interfaces.CommandContext) error

AttachPTYCommand attaches to the selected PTY

func AttachSessionCommand

func AttachSessionCommand(ctx *interfaces.CommandContext) error

AttachSessionCommand attaches to the selected session

func CheckoutCommand

func CheckoutCommand(ctx *interfaces.CommandContext) error

CheckoutCommand commits changes and pauses the session

func ClaudeSettingsCommand

func ClaudeSettingsCommand(ctx *interfaces.CommandContext) error

ClaudeSettingsCommand opens Claude Code settings configuration

func ClearFiltersCommand

func ClearFiltersCommand(ctx *interfaces.CommandContext) error

ClearFiltersCommand clears all filters and search

func CommandModeCommand

func CommandModeCommand(ctx *interfaces.CommandContext) error

CommandModeCommand enters vim-style command mode

func CommitAmendCommand

func CommitAmendCommand(ctx *interfaces.CommandContext) error

CommitAmendCommand amends the last commit

func CommitCommand

func CommitCommand(ctx *interfaces.CommandContext) error

CommitCommand creates a new commit

func ConfigEditorCommand

func ConfigEditorCommand(ctx *interfaces.CommandContext) error

ConfigEditorCommand opens the Claude config editor overlay

func ConfirmCommand

func ConfirmCommand(ctx *interfaces.CommandContext) error

ConfirmCommand handles confirmation in dialogs

func CycleGroupingModeCommand

func CycleGroupingModeCommand(ctx *interfaces.CommandContext) error

CycleGroupingModeCommand cycles through different grouping strategies

func CycleSortModeCommand

func CycleSortModeCommand(ctx *interfaces.CommandContext) error

CycleSortModeCommand cycles through different sort modes Sequence: LastActivity → CreationDate → TitleAZ → Repository → Branch → Status

func DisconnectPTYCommand

func DisconnectPTYCommand(ctx *interfaces.CommandContext) error

DisconnectPTYCommand disconnects from the current PTY

func DownCommand

func DownCommand(ctx *interfaces.CommandContext) error

DownCommand moves selection down

func EscapeCommand

func EscapeCommand(ctx *interfaces.CommandContext) error

EscapeCommand handles escape key

func FilterPausedCommand

func FilterPausedCommand(ctx *interfaces.CommandContext) error

FilterPausedCommand toggles visibility of paused sessions

func GitStatusCommand

func GitStatusCommand(ctx *interfaces.CommandContext) error

GitStatusCommand opens the fugitive-style git status interface

func HelpCommand

func HelpCommand(ctx *interfaces.CommandContext) error

HelpCommand shows help

func HistoryBrowserCommand

func HistoryBrowserCommand(ctx *interfaces.CommandContext) error

HistoryBrowserCommand opens the history browser overlay

func KillSessionCommand

func KillSessionCommand(ctx *interfaces.CommandContext) error

KillSessionCommand kills/deletes the selected session

func LeftCommand

func LeftCommand(ctx *interfaces.CommandContext) error

LeftCommand moves selection left or collapses categories

func LegacySubmitCommand

func LegacySubmitCommand(ctx *interfaces.CommandContext) error

LegacySubmitCommand provides backward compatibility for the old submit workflow

func NewSessionCommand

func NewSessionCommand(ctx *interfaces.CommandContext) error

NewSessionCommand creates a new session

func NextReviewCommand

func NextReviewCommand(ctx *interfaces.CommandContext) error

NextReviewCommand navigates to the next session in the review queue

func PageDownCommand

func PageDownCommand(ctx *interfaces.CommandContext) error

PageDownCommand scrolls down by page

func PageUpCommand

func PageUpCommand(ctx *interfaces.CommandContext) error

PageUpCommand scrolls up by page

func PreviousReviewCommand

func PreviousReviewCommand(ctx *interfaces.CommandContext) error

PreviousReviewCommand navigates to the previous session in the review queue

func PullCommand

func PullCommand(ctx *interfaces.CommandContext) error

PullCommand pulls changes from remote

func PushCommand

func PushCommand(ctx *interfaces.CommandContext) error

PushCommand pushes changes to remote

func QuitCommand

func QuitCommand(ctx *interfaces.CommandContext) error

QuitCommand quits the application

func RefreshPTYsCommand

func RefreshPTYsCommand(ctx *interfaces.CommandContext) error

RefreshPTYsCommand manually refreshes the PTY list

func RenameSessionCommand

func RenameSessionCommand(ctx *interfaces.CommandContext) error

RenameSessionCommand handles renaming a session

func ResizeCommand

func ResizeCommand(ctx *interfaces.CommandContext) error

ResizeCommand manually triggers terminal resize detection

func RestartSessionCommand

func RestartSessionCommand(ctx *interfaces.CommandContext) error

RestartSessionCommand handles restarting a session

func ResumeCommand

func ResumeCommand(ctx *interfaces.CommandContext) error

ResumeCommand resumes a paused session

func RightCommand

func RightCommand(ctx *interfaces.CommandContext) error

RightCommand moves selection right or expands categories

func SearchCommand

func SearchCommand(ctx *interfaces.CommandContext) error

SearchCommand enters search mode

func SendCommandToPTYCommand

func SendCommandToPTYCommand(ctx *interfaces.CommandContext) error

SendCommandToPTYCommand opens the command input overlay for the selected PTY

func SetGitHandlers

func SetGitHandlers(handlers *GitHandlers)

SetGitHandlers configures the git command handlers

func SetNavigationHandlers

func SetNavigationHandlers(handlers *NavigationHandlers)

SetNavigationHandlers configures the navigation command handlers

func SetOrganizationHandlers

func SetOrganizationHandlers(handlers *OrganizationHandlers)

SetOrganizationHandlers configures the organization command handlers

func SetPTYHandlers

func SetPTYHandlers(handlers *PTYHandlers)

SetPTYHandlers configures the PTY command handlers

func SetSessionHandlers

func SetSessionHandlers(handlers *SessionHandlers)

SetSessionHandlers configures the session command handlers

func SetSystemHandlers

func SetSystemHandlers(handlers *SystemHandlers)

SetSystemHandlers configures the system command handlers

func SetVCHandlers

func SetVCHandlers(handlers *VCHandlers)

SetVCHandlers configures the VC command handlers

func ShowDiffCommand

func ShowDiffCommand(ctx *interfaces.CommandContext) error

ShowDiffCommand shows diff for the selected file

func StageFileCommand

func StageFileCommand(ctx *interfaces.CommandContext) error

StageFileCommand stages the selected file for commit

func TabCommand

func TabCommand(ctx *interfaces.CommandContext) error

TabCommand handles tab key

func TagEditorCommand

func TagEditorCommand(ctx *interfaces.CommandContext) error

TagEditorCommand opens the tag editor for the selected session

func ToggleFileCommand

func ToggleFileCommand(ctx *interfaces.CommandContext) error

ToggleFileCommand toggles staging status of the selected file

func ToggleGroupCommand

func ToggleGroupCommand(ctx *interfaces.CommandContext) error

ToggleGroupCommand toggles expand/collapse of category groups

func TogglePTYViewCommand

func TogglePTYViewCommand(ctx *interfaces.CommandContext) error

TogglePTYViewCommand toggles between session list and PTY list view

func ToggleReviewQueueCommand

func ToggleReviewQueueCommand(ctx *interfaces.CommandContext) error

ToggleReviewQueueCommand toggles the review queue view mode

func ToggleSortDirectionCommand

func ToggleSortDirectionCommand(ctx *interfaces.CommandContext) error

ToggleSortDirectionCommand toggles between ascending and descending sort order

func UnstageAllCommand

func UnstageAllCommand(ctx *interfaces.CommandContext) error

UnstageAllCommand unstages all staged files

func UnstageFileCommand

func UnstageFileCommand(ctx *interfaces.CommandContext) error

UnstageFileCommand unstages the selected file

func UpCommand

func UpCommand(ctx *interfaces.CommandContext) error

UpCommand moves selection up

func VCCommandPaletteCommand

func VCCommandPaletteCommand(ctx *interfaces.CommandContext) error

VCCommandPaletteCommand opens the VC command palette

func VCNavigateDownCommand

func VCNavigateDownCommand(ctx *interfaces.CommandContext) error

VCNavigateDownCommand navigates down in VC file list

func VCNavigateUpCommand

func VCNavigateUpCommand(ctx *interfaces.CommandContext) error

VCNavigateUpCommand navigates up in VC file list

func VCOpenTerminalCommand

func VCOpenTerminalCommand(ctx *interfaces.CommandContext) error

VCOpenTerminalCommand opens an interactive terminal for VCS operations

func VCStageAllCommand

func VCStageAllCommand(ctx *interfaces.CommandContext) error

VCStageAllCommand stages all files

func VCStageFileCommand

func VCStageFileCommand(ctx *interfaces.CommandContext) error

VCStageFileCommand stages the selected file

func VCToggleHelpCommand

func VCToggleHelpCommand(ctx *interfaces.CommandContext) error

VCToggleHelpCommand toggles help visibility in VC pane

func VCUnstageAllCommand

func VCUnstageAllCommand(ctx *interfaces.CommandContext) error

VCUnstageAllCommand unstages all files

func VCUnstageFileCommand

func VCUnstageFileCommand(ctx *interfaces.CommandContext) error

VCUnstageFileCommand unstages the selected file

func WorkspaceStatusCommand

func WorkspaceStatusCommand(ctx *interfaces.CommandContext) error

WorkspaceStatusCommand opens the workspace status overlay

func WorkspaceSwitchCommand

func WorkspaceSwitchCommand(ctx *interfaces.CommandContext) error

WorkspaceSwitchCommand opens the workspace switch overlay

Types

type GitHandlers

type GitHandlers struct {
	OnGitStatus    func() (tea.Model, tea.Cmd)
	OnStageFile    func(filePath string) (tea.Model, tea.Cmd)
	OnUnstageFile  func(filePath string) (tea.Model, tea.Cmd)
	OnToggleFile   func(filePath string) (tea.Model, tea.Cmd)
	OnUnstageAll   func() (tea.Model, tea.Cmd)
	OnCommit       func() (tea.Model, tea.Cmd)
	OnCommitAmend  func() (tea.Model, tea.Cmd)
	OnShowDiff     func(filePath string) (tea.Model, tea.Cmd)
	OnPush         func() (tea.Model, tea.Cmd)
	OnPull         func() (tea.Model, tea.Cmd)
	OnLegacySubmit func() (tea.Model, tea.Cmd) // For backwards compatibility
}

GitHandlers contains handlers for git-related commands

type NavigationHandlers struct {
	OnUp                func() (tea.Model, tea.Cmd)
	OnDown              func() (tea.Model, tea.Cmd)
	OnLeft              func() (tea.Model, tea.Cmd)
	OnRight             func() (tea.Model, tea.Cmd)
	OnPageUp            func() (tea.Model, tea.Cmd)
	OnPageDown          func() (tea.Model, tea.Cmd)
	OnSearch            func() (tea.Model, tea.Cmd)
	OnNextReview        func() (tea.Model, tea.Cmd)
	OnPreviousReview    func() (tea.Model, tea.Cmd)
	OnToggleReviewQueue func() (tea.Model, tea.Cmd)
}

NavigationHandlers contains handlers for navigation commands

type OrganizationHandlers

type OrganizationHandlers struct {
	OnFilterPaused        func() (tea.Model, tea.Cmd)
	OnClearFilters        func() (tea.Model, tea.Cmd)
	OnToggleGroup         func() (tea.Model, tea.Cmd)
	OnCycleGroupingMode   func() (tea.Model, tea.Cmd)
	OnCycleSortMode       func() (tea.Model, tea.Cmd)
	OnToggleSortDirection func() (tea.Model, tea.Cmd)
}

OrganizationHandlers contains handlers for organization/filtering commands

type PTYHandlers

type PTYHandlers struct {
	OnTogglePTYView func() (tea.Model, tea.Cmd)
	OnAttachPTY     func() (tea.Model, tea.Cmd)
	OnSendCommand   func() (tea.Model, tea.Cmd)
	OnDisconnectPTY func() (tea.Model, tea.Cmd)
	OnRefreshPTYs   func() (tea.Model, tea.Cmd)
}

PTYHandlers contains handlers for PTY management commands

type SessionHandlers

type SessionHandlers struct {
	// These will be set by the application when integrating with the new system
	OnNewSession      func() (tea.Model, tea.Cmd)
	OnKillSession     func() (tea.Model, tea.Cmd)
	OnAttachSession   func() (tea.Model, tea.Cmd)
	OnCheckout        func() (tea.Model, tea.Cmd)
	OnResume          func() (tea.Model, tea.Cmd)
	OnClaudeSettings  func() (tea.Model, tea.Cmd)
	OnTagEditor       func() (tea.Model, tea.Cmd)
	OnHistoryBrowser  func() (tea.Model, tea.Cmd)
	OnConfigEditor    func() (tea.Model, tea.Cmd)
	OnRenameSession   func() (tea.Model, tea.Cmd)
	OnRestartSession  func() (tea.Model, tea.Cmd)
	OnWorkspaceStatus func() (tea.Model, tea.Cmd)
	OnWorkspaceSwitch func() (tea.Model, tea.Cmd)
}

SessionHandlers contains handlers for session management commands

type SystemHandlers

type SystemHandlers struct {
	OnHelp        func() (tea.Model, tea.Cmd)
	OnQuit        func() (tea.Model, tea.Cmd)
	OnEscape      func() (tea.Model, tea.Cmd)
	OnTab         func() (tea.Model, tea.Cmd)
	OnConfirm     func() (tea.Model, tea.Cmd)
	OnCommandMode func() (tea.Model, tea.Cmd)
	OnResize      func() (tea.Model, tea.Cmd)
}

SystemHandlers contains handlers for system commands

type VCHandlers

type VCHandlers struct {
	OnVCStageFile      func() (tea.Model, tea.Cmd)
	OnVCUnstageFile    func() (tea.Model, tea.Cmd)
	OnVCStageAll       func() (tea.Model, tea.Cmd)
	OnVCUnstageAll     func() (tea.Model, tea.Cmd)
	OnVCOpenTerminal   func() (tea.Model, tea.Cmd)
	OnVCToggleHelp     func() (tea.Model, tea.Cmd)
	OnVCNavigateUp     func() (tea.Model, tea.Cmd)
	OnVCNavigateDown   func() (tea.Model, tea.Cmd)
	OnVCCommandPalette func() (tea.Model, tea.Cmd)
}

VCHandlers contains handlers for version control commands

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL