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.

823 B
Raw Blame
import type { MobileWebShellSessionState } from './mobile-web-shell-session-contract'
import {
  updateFailureWallOf,
  type MobileWebShellUpdateFailureFacts
} from './mobile-web-shell-update-failure'

export function updateFailureOutcomeOf(
  state: MobileWebShellSessionState
): Pick<MobileWebShellUpdateFailureFacts, 'outcome' | 'wall'> {
  switch (state.kind) {
    case 'activating':
    case 'ready':
      return { outcome: 'opened-cached', wall: null }
    case 'route-unavailable':
      return { outcome: 'route-unavailable', wall: null }
    case 'wall':
      return { outcome: 'wall', wall: updateFailureWallOf(state.verdict) }
    case 'failed':
      return { outcome: 'failed', wall: null }
    case 'checking':
    case 'fetching':
    case 'offline':
      return { outcome: 'waiting', wall: null }
  }
}