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
501 B
Raw Blame
import type { RenderSurface } from 'claude-code'

/**
 * Whether a render event comes from a surface that draws the pane: every
 * one but the mobile app, which has no Select and is not terminal-wide.
 *
 * @param e the render event, or anything naming its surface
 * @returns false on `mobile`, true otherwise, narrowing `e` to the rest
 */
export const isOnPaneSurface = <E extends Record<'surface', RenderSurface>>(
  e: E,
): e is Exclude<E, Record<'surface', 'mobile'>> => e.surface !== 'mobile'