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.

573 B
Raw Blame
import { isClipboardTextByteLengthOverLimit } from '../clipboard-text'

export const GITHUB_PROJECT_REF_INPUT_MAX_BYTES = 2 * 1024
export const GITHUB_PROJECT_REF_INPUT_TOO_LARGE_ERROR = 'Project reference is too large to resolve.'

export function isGitHubProjectRefInputTooLarge(
  input: string,
  maxBytes = GITHUB_PROJECT_REF_INPUT_MAX_BYTES
): boolean {
  return isClipboardTextByteLengthOverLimit(input, maxBytes)
}

export function hasBoundedGitHubProjectRefInputText(input: string): boolean {
  return !isGitHubProjectRefInputTooLarge(input) && /\S/.test(input)
}