( filePath: string, event: 'change' | 'add' | 'unlink', timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, )
| 4435 | } |
| 4436 | |
| 4437 | export function executeFileChangedHooks( |
| 4438 | filePath: string, |
| 4439 | event: 'change' | 'add' | 'unlink', |
| 4440 | timeoutMs: number = TOOL_HOOK_EXECUTION_TIMEOUT_MS, |
| 4441 | ): Promise<{ |
| 4442 | results: HookOutsideReplResult[] |
| 4443 | watchPaths: string[] |
| 4444 | systemMessages: string[] |
| 4445 | }> { |
| 4446 | const hookInput = { |
| 4447 | ...createBaseHookInput(undefined), |
| 4448 | hook_event_name: 'FileChanged' as const, |
| 4449 | file_path: filePath, |
| 4450 | event, |
| 4451 | } as unknown as FileChangedHookInput |
| 4452 | return executeEnvHooks(hookInput, timeoutMs) |
| 4453 | } |
| 4454 | |
| 4455 | export type InstructionsLoadReason = |
| 4456 | | 'session_start' |
no test coverage detected