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 / telemetry / hooks / entries / event-data-of / metadata-of / metadata-of.ts
14 lines · 500 BRaw
1import type Batching from '../../../batching'
2
3/**
4 * The row's `additional_metadata`: its properties as base64 JSON, the
5 * repository's remote hash beside them as the CLI's own rows carry it.
6 *
7 * @param row the row as it was queued
8 * @param remoteHash the session's remote hash, when it is in a repository
9 * @returns the base64 text
10 */
11export const metadataOf = (
12 row: Batching.PendingRow,
13 remoteHash: string | undefined,
14) => btoa(JSON.stringify({ rh: remoteHash, ...row.fields.props }))