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.

1008 B
Raw Blame
import { expect, it } from 'vitest'
import { agentLaunchSettingsMutationUpdates } from './agent-launch-settings'
import { structuredLaunchSeedOptions } from './native-chat/input/native-chat-session-option-defaults'

it.each([
  ['yolo', 'full-access'],
  ['manual', 'own'],
  ['auto', 'auto']
] as const)(
  'legacy %s permission updates feed the single choice and new chats',
  (mode, expected) => {
    const before = {
      agentPermissionDefault: 'full-access' as const,
      nativeChatPermissionMode: 'accept-edits' as const
    }
    const updates = agentLaunchSettingsMutationUpdates(
      before,
      { type: 'permissions', mode },
      'linux'
    )
    const after = { ...before, ...updates }
    expect(after.nativeChatPermissionMode).toBe('accept-edits')
    for (const agent of ['claude', 'codex'] as const) {
      expect(structuredLaunchSeedOptions(after, agent)).toEqual({ permissionMode: expected })
    }
    expect(updates).not.toHaveProperty('agentNativeChatPermissionModes')
  }
)