Files
claude-code/src/utils/commandLifecycle.ts
claude-code-best f90eee85d8 feat: build
2026-03-31 19:22:47 +08:00

22 lines
440 B
TypeScript

type CommandLifecycleState = 'started' | 'completed'
type CommandLifecycleListener = (
uuid: string,
state: CommandLifecycleState,
) => void
let listener: CommandLifecycleListener | null = null
export function setCommandLifecycleListener(
cb: CommandLifecycleListener | null,
): void {
listener = cb
}
export function notifyCommandLifecycle(
uuid: string,
state: CommandLifecycleState,
): void {
listener?.(uuid, state)
}