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 / tests / fixtures / rows-of.ts
17 lines · 584 BRaw
1import type { Row, Started } from './types'
2
3/**
4 * What the plugin handed the telemetry noun so far, read off the transcript
5 * lines RECORDING wrote, in the order handed; other lines are passed over.
6 *
7 * @param started the session's start, whose lines hold the rows
8 * @returns the `[op, entry]` pairs
9 */
10export const rowsOf = (started: Started): Row[] =>
11 started.lines
12 .filter(line => line.startsWith('log ') || line.startsWith('mark '))
13 .map((line): Row => {
14 const at = line.indexOf(' ')
15
16 return [line.slice(0, at), JSON.parse(line.slice(at + 1))]
17 })