source dump of claude code
at main 21 lines 440 B view raw
1type CommandLifecycleState = 'started' | 'completed' 2 3type CommandLifecycleListener = ( 4 uuid: string, 5 state: CommandLifecycleState, 6) => void 7 8let listener: CommandLifecycleListener | null = null 9 10export function setCommandLifecycleListener( 11 cb: CommandLifecycleListener | null, 12): void { 13 listener = cb 14} 15 16export function notifyCommandLifecycle( 17 uuid: string, 18 state: CommandLifecycleState, 19): void { 20 listener?.(uuid, state) 21}