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
776 B
Raw Blame
import type Modes from '../modes'
import { LOAD_EVENT } from './load-event.js'
import { modeChoiceOf } from './mode-choice-of.js'
import type { LoadCounts, TelemetryRow } from './types'

/**
 * The first-context row: the mode and what was handed to the engine, in
 * counts only; no path and no text.
 *
 * @param mode the configured mode
 * @param counts what the first context handed on
 * @returns the row to send
 */
export const loadRowOf = (
  mode: Modes.Mode,
  counts: LoadCounts,
): TelemetryRow => ({
  event: LOAD_EVENT,
  props: {
    mode: modeChoiceOf(mode),
    file_count: counts.fileCount,
    import_count: counts.importCount,
    total_content_length: counts.totalContentLength,
    yielded: counts.isYielded,
    walk_failed: counts.isWalkFailed,
  },
})