Skip to content

armgit / orca

Public Imported from GitHub
0

Orca is the place for working with a fleet of agents (e.g. Grok Bot, Claude Code). Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

929 B
Raw Blame
import { describe, expect, it } from 'vitest'
import { resolveWindowShortcutAction } from './window-shortcut-policy'

const input = {
  code: 'KeyD',
  key: 'd',
  meta: false,
  control: true,
  alt: true,
  shift: false
}

describe('agent dashboard toggle shortcut', () => {
  it('resolves a custom binding to the dashboard toggle', () => {
    expect(
      resolveWindowShortcutAction(input, 'linux', { 'dashboard.toggle': ['Mod+Alt+D'] })
    ).toEqual({ type: 'toggleAgentDashboard' })
  })

  it('still resolves while a terminal owns focus under terminal-first', () => {
    // allowInTerminal must deliver the dashboard chord even while the PTY owns input.
    expect(
      resolveWindowShortcutAction(
        input,
        'linux',
        { 'dashboard.toggle': ['Mod+Alt+D'] },
        { context: 'terminal', terminalShortcutPolicy: 'terminal-first' }
      )
    ).toEqual({ type: 'toggleAgentDashboard' })
  })
})