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.

528 B
Raw Blame
import { optionName } from './print-mode-headless-command'

const ANTE_HEADLESS_PROMPT_FLAGS = new Set(['--prompt', '-p'])

function isAnteHeadlessPromptFlag(token: string): boolean {
  const name = optionName(token)
  return ANTE_HEADLESS_PROMPT_FLAGS.has(name) || /^-p[^-]/.test(name)
}

export function isAnteHeadlessOneShotCommand(tokens: readonly string[]): boolean {
  for (let index = 1; index < tokens.length; index += 1) {
    if (isAnteHeadlessPromptFlag(tokens[index])) {
      return true
    }
  }
  return false
}