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.

721 B
Raw Blame
// Separate later text from pasted image paths (pngadd → png add), matching desktop mixed-path drops.
export const IMAGE_PASTE_FOLLOWING_TEXT_SEPARATOR = ' '

export function separateImagePasteFromFollowingText(
  framedImagePaste: string,
  followedByNonImageInput: boolean
): string {
  return followedByNonImageInput
    ? `${framedImagePaste}${IMAGE_PASTE_FOLLOWING_TEXT_SEPARATOR}`
    : framedImagePaste
}

export function imagePasteWritesFollowedByText(
  framedImagePastes: readonly string[],
  followedByText: boolean
): string[] {
  return framedImagePastes.map((paste, index) =>
    separateImagePasteFromFollowingText(
      paste,
      index === framedImagePastes.length - 1 && followedByText
    )
  )
}