spacehub

surshar / claude-code

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.

Built by Anthropic · github.com/anthropics

claude-code / mods / agents-md / hooks / telemetry / mode-row-of.ts
20 lines · 590 BRaw
1import type Modes from '../modes'
2import { modeChoiceOf } from './mode-choice-of.js'
3import { MODE_EVENT } from './mode-event.js'
4import type { TelemetryRow } from './types'
5
6/**
7 * The `session.start` row: the configured mode and whether a person is at
8 * the terminal.
9 *
10 * @param mode the configured mode
11 * @param isInteractive whether a person is at the terminal
12 * @returns the row to send
13 */
14export const modeRowOf = (
15 mode: Modes.Mode,
16 isInteractive: boolean,
17): TelemetryRow => ({
18 event: MODE_EVENT,
19 props: { mode: modeChoiceOf(mode), is_interactive: isInteractive },
20})