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 / load-mark-of.ts
15 lines · 581 BRaw
1import { FEATURE_NAME } from './feature-name.js'
2import type { LoadCounts, TelemetryMark } from './types'
3import { WALK_FAILED_REASON } from './walk-failed-reason.js'
4
5/**
6 * The first context's feature mark: `ok`, or `sad` when the walk failed and
7 * the context went on without AGENTS.md.
8 *
9 * @param counts what the first context handed on
10 * @returns the mark to send
11 */
12export const loadMarkOf = (counts: LoadCounts): TelemetryMark =>
13 counts.isWalkFailed
14 ? { feature: FEATURE_NAME, kind: 'sad', reason: WALK_FAILED_REASON }
15 : { feature: FEATURE_NAME, kind: 'ok' }