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 / tests / fixtures / plugins / recording.ts
18 lines · 501 BRaw
1import type { Plugin } from 'claude-code/testing'
2
3/**
4 * A built-in plugin whose `/record <entry>` logs the entry through
5 * `$.telemetry`, answering "queued", or why the row was refused.
6 */
7export const recording: Plugin = {
8 name: 'recording',
9 tier: 'builtin',
10 register(on) {
11 on('command.run', { command: 'record' }, ($, e) =>
12 $.telemetry.log(JSON.parse(e.args)).then(
13 () => ({ text: 'queued' }),
14 (error: unknown) => ({ text: String(error) }),
15 ),
16 )
17 },
18}