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.

878 B
Raw Blame
import { translate } from '../i18n/mobile-i18n'

export type SourceControlHubTab = 'changes' | 'pr' | 'history'

export const SOURCE_CONTROL_HUB_TABS: readonly SourceControlHubTab[] = [
  'changes',
  'pr',
  'history'
] as const

export const SOURCE_CONTROL_HUB_TAB_LABELS: Record<SourceControlHubTab, string> = {
  get changes() {
    return translate('sourceControl.hubTab.changes', 'Changes')
  },
  get pr() {
    return translate('sourceControl.hubTab.pullRequest', 'Pull Request')
  },
  get history() {
    return translate('sourceControl.hubTab.commits', 'Commits')
  }
}

export function parseSourceControlHubTab(
  value: string | string[] | undefined | null
): SourceControlHubTab {
  const first = Array.isArray(value) ? value[0] : value
  return SOURCE_CONTROL_HUB_TABS.includes(first as SourceControlHubTab)
    ? (first as SourceControlHubTab)
    : 'changes'
}