quinjet 0.0.94

A fast, live, keyboard-first Git source-control interface for the terminal
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub(crate) enum PaletteCommand {
    SwitchAccount,
    Refresh,
    StageAll,
    UnstageAll,
    Commit,
    Amend,
    Fetch,
    Pull,
    Push,
    Sync,
    Stash,
    StashStaged,
    StashIncludeUntracked,
    StashPop,
    ManageStashes,
    OpenProject,
    OpenProjectNewTab,
    Branches,
    CompareBranch,
    RenameCurrentBranch,
    ToggleDiffLayout,
    ToggleCodeWrap,
    ToggleAllFiles,
    ShowChanges,
    ShowHistory,
    ShowPullRequests,
    ChangeTheme,
    ChangeAppearance,
    AiCommitMessage,
    AiReview,
    AiExplainCheck,
    AiInvestigate,
    ConnectAgents,
    GraftGateway,
    GraftTools,
    Help,
    Quit,
}

impl PaletteCommand {
    pub(crate) const ALL: [Self; 37] = [
        Self::SwitchAccount,
        Self::Refresh,
        Self::StageAll,
        Self::UnstageAll,
        Self::Commit,
        Self::Amend,
        Self::Fetch,
        Self::Pull,
        Self::Push,
        Self::Sync,
        Self::Stash,
        Self::StashStaged,
        Self::StashIncludeUntracked,
        Self::StashPop,
        Self::ManageStashes,
        Self::OpenProject,
        Self::OpenProjectNewTab,
        Self::Branches,
        Self::CompareBranch,
        Self::RenameCurrentBranch,
        Self::ToggleDiffLayout,
        Self::ToggleCodeWrap,
        Self::ToggleAllFiles,
        Self::ShowChanges,
        Self::ShowHistory,
        Self::ShowPullRequests,
        Self::ChangeTheme,
        Self::ChangeAppearance,
        Self::AiCommitMessage,
        Self::AiReview,
        Self::AiExplainCheck,
        Self::AiInvestigate,
        Self::ConnectAgents,
        Self::GraftGateway,
        Self::GraftTools,
        Self::Help,
        Self::Quit,
    ];

    pub(crate) const fn label(self) -> &'static str {
        match self {
            Self::SwitchAccount => "Switch GitHub Account for This Repository…",
            Self::Refresh => "Refresh Repository",
            Self::StageAll => "Stage All Changes",
            Self::UnstageAll => "Unstage All Changes",
            Self::Commit => "Commit Staged Changes",
            Self::Amend => "Amend Previous Commit",
            Self::Fetch => "Fetch All Remotes",
            Self::Pull => "Pull",
            Self::Push => "Push",
            Self::Sync => "Synchronize (Pull, Then Push)",
            Self::Stash => "Stash Changes…",
            Self::StashStaged => "Stash Staged Changes…",
            Self::StashIncludeUntracked => "Stash Changes Including Untracked…",
            Self::StashPop => "Pop Latest Stash",
            Self::ManageStashes => "View and Manage Stashes…",
            Self::OpenProject => "Switch Project in Current Tab…",
            Self::OpenProjectNewTab => "Open Project in New Tab…",
            Self::Branches => "Switch Branch…",
            Self::CompareBranch => "Compare Current Branch With…",
            Self::RenameCurrentBranch => "Rename Current Branch…",
            Self::ToggleDiffLayout => "Toggle Unified / Side-by-Side Diff",
            Self::ToggleCodeWrap => "Toggle Code Wrap",
            Self::ToggleAllFiles => "Collapse / Expand All Files",
            Self::ShowChanges => "Show Changes",
            Self::ShowHistory => "Show Commit History",
            Self::ShowPullRequests => "Show Pull Requests",
            Self::ChangeTheme => "Change Theme…",
            Self::ChangeAppearance => "Change Appearance…",
            Self::AiCommitMessage => "Draft Commit Message with Claude",
            Self::AiReview => "Review Changes with Claude",
            Self::AiExplainCheck => "Explain Failing Check with Claude",
            Self::AiInvestigate => "Investigate Pull Request with Claude",
            Self::ConnectAgents => "Connect AI Agents to Quinjet",
            Self::GraftGateway => "Show Graftcode Gateway",
            Self::GraftTools => "Run a Tool from Another Graftcode Gateway…",
            Self::Help => "Keyboard Shortcuts",
            Self::Quit => "Quit Quinjet",
        }
    }
}