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.

617 B
Raw Blame
// Reject overlapping write sequences per host terminal to prevent interleaved bytes; module scope survives screens sharing the PTY.
const writeInFlightTerminals = new Set<string>()

export function acquireMobileNativeChatTerminalWrite(terminal: string): boolean {
  if (writeInFlightTerminals.has(terminal)) {
    return false
  }
  writeInFlightTerminals.add(terminal)
  return true
}

export function releaseMobileNativeChatTerminalWrite(terminal: string): void {
  writeInFlightTerminals.delete(terminal)
}

export function resetMobileNativeChatTerminalWritesForTests(): void {
  writeInFlightTerminals.clear()
}