Skip to content

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

TypeScript
401 B
Raw Blame
import type Git from '../../git'

/**
 * A stored or picked value as a base mode, or null when it names none.
 *
 * @param value what `$.store.get` returned or a Select carried
 * @returns the mode, or null
 */
export function baseModeOf(value: unknown): Git.BaseMode | null {
  const isMode =
    value === 'session' || value === 'uncommitted' || value === 'branch'

  return isMode ? value : null
}