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