Skip to main content

Overview

The command palette is a searchable overlay that exposes every action in Jarvis. Press Cmd+P (or your configured keybind) to open it, type to filter, and press Enter to execute.

Fuzzy Search

Type partial matches to filter actions

Categorized

Actions grouped by category (Panes, Window, Apps, etc.)

Dynamic Items

Plugins and games automatically added

Keyboard Navigation

Arrow keys, Enter, and Escape

Input Modes

The input system maintains an InputMode that determines how key events are routed:
ModeDescription
TerminalDefault. Keybinds checked first; unmatched keys sent to PTY
CommandPalettePalette open. All keys routed to filter/selection handler
AssistantAI assistant panel open. Keys routed to text input
SettingsSettings UI open. Keys consumed (not forwarded to terminal)
Opening the command palette sets mode to CommandPalette until dismissed.

Palette Categories

Actions are organized into 7 categories:
  • New Pane
  • Close Pane
  • Split Horizontal / Vertical
  • Focus Pane (1-5)
  • Focus Next/Previous
  • Zoom Pane
  • Resize Pane
  • Swap Pane
  • Toggle Fullscreen
  • Quit
  • Command Palette
  • Settings
  • Chat
  • Assistant
  • Close Overlay
  • Scroll Up/Down
  • Scroll to Top/Bottom
  • Copy / Paste / Select All
  • Find (Open/Close/Next/Previous)
  • Clear Terminal
  • Asteroids
  • Tetris
  • Minesweeper
  • Pinball
  • Doodle Jump
  • Subway Surfers
  • Kart Bros
  • Basket Bros
  • Open URL (dynamic prompt)
  • Pair Mobile Device
  • Revoke Mobile Pairing
  • Reload Config
  • Push to Talk

Action Enum

Every user-triggerable operation is represented by an Action variant. Here are key examples:
pub enum Action {
    NewPane,
    ClosePane,
    SplitHorizontal,
    SplitVertical,
    FocusPane(usize),
    FocusNextPane,
    FocusPrevPane,
    ZoomPane,
    ResizePane { direction: Direction, delta: i32 },
    SwapPane(Direction),
    ToggleFullscreen,
    Quit,
    OpenCommandPalette,
    OpenSettings,
    OpenChat,
    OpenAssistant,
    CloseOverlay,
    LaunchGame(String),
    OpenURL(String),
    PairMobile,
    RevokeMobilePairing,
    ReloadConfig,
    Copy,
    Paste,
    SelectAll,
    ScrollUp(u32),
    ScrollDown(u32),
    ScrollToTop,
    ScrollToBottom,
    ClearTerminal,
    PushToTalk,
    ReleasePushToTalk,
    None,
}
Source: jarvis-rs/crates/jarvis-common/src/actions/action_enum.rs

Default Keybinds

These are the built-in keyboard shortcuts:
KeybindActionDescription
Cmd+POpenCommandPaletteOpen command palette
Cmd+Shift+POpenSettingsOpen settings panel
Cmd+TNewPaneCreate new terminal pane
Cmd+WClosePaneClose current pane
Cmd+DSplitHorizontalSplit pane side-by-side
Cmd+Shift+DSplitVerticalSplit pane top-bottom
Cmd+1 through Cmd+5FocusPane(n)Focus pane by number
Cmd+[FocusPrevPaneCycle focus left
Cmd+]FocusNextPaneCycle focus right
Cmd+Shift+FToggleFullscreenToggle fullscreen
Cmd+QQuitQuit application
Cmd+CCopyCopy selection
Cmd+VPastePaste from clipboard
Cmd+ASelectAllSelect all text
Cmd+KClearTerminalClear scrollback
Cmd+FSearchOpenOpen find bar
Cmd+/OpenChatOpen chat panel
Cmd+Shift+AOpenAssistantToggle AI assistant
Left ControlPushToTalkVoice input (hold)
All keybinds are customizable in config.toml. See Configuration: Keybindings for details.

Palette Implementation

Rendering

The palette is rendered by CommandPalette in the jarvis-renderer crate:
pub struct CommandPalette {
    pub items: Vec<PaletteItem>,
    pub selected_index: usize,
    pub filter: String,
    pub mode: PaletteMode,
}

pub struct PaletteItem {
    pub label: String,
    pub action: Action,
    pub category: String,
    pub icon: Option<String>,
}

pub enum PaletteMode {
    Command,   // Default: show all actions
    URLPrompt, // User typing a URL to open
}

Filtering

Fuzzy matching is case-insensitive and matches partial strings:
let filtered: Vec<&PaletteItem> = items.iter()
    .filter(|item| item.label.to_lowercase().contains(&filter.to_lowercase()))
    .collect();

Keyboard Navigation

When InputMode::CommandPalette is active:
  • Up/Down Arrow: Change selected_index
  • Enter: Dispatch the selected action
  • Escape: Close palette and return to Terminal mode
  • Any other key: Append to filter string

IPC Integration

The palette communicates with WebViews via IPC: Rust → JavaScript:
{
  "kind": "palette_show",
  "payload": {
    "items": [
      { "label": "New Pane", "category": "Panes", "icon": "plus" },
      { "label": "Split Horizontal", "category": "Panes", "icon": "columns" }
    ],
    "selected": 0
  }
}
JavaScript → Rust:
{ "kind": "palette_click", "payload": { "index": 3 } }
{ "kind": "palette_hover", "payload": { "index": 1 } }
{ "kind": "palette_dismiss", "payload": {} }

Adding Custom Actions

Plugins can add items to the palette by declaring actions in plugin.toml:
[[actions]]
label = "Open Dashboard"
category = "Web"
icon = "chart-line"
url = "https://example.com/dashboard"
These are automatically registered when the plugin loads.

Source References

  • jarvis-rs/crates/jarvis-renderer/src/command_palette.rs - Palette state
  • jarvis-rs/crates/jarvis-platform/src/input_processor/ - Input routing
  • jarvis-rs/crates/jarvis-common/src/actions/ - Action enum
  • docs/manual/07-input-palette.md - Complete reference