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