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.

615 B
Raw Blame
const WRAPPER_SEPARATOR = ' | '

/** Check whole-to-innermost titles so wrapper prefixes such as zsh | do not hide an anchored pane identity. */
export function getWrapperTitleSegments(title: string): string[] {
  const segments = [title]
  let separatorIndex = title.indexOf(WRAPPER_SEPARATOR)
  while (separatorIndex >= 0) {
    const wrapped = title.slice(separatorIndex + WRAPPER_SEPARATOR.length).trim()
    if (wrapped && !segments.includes(wrapped)) {
      segments.push(wrapped)
    }
    separatorIndex = title.indexOf(WRAPPER_SEPARATOR, separatorIndex + WRAPPER_SEPARATOR.length)
  }
  return segments
}