(event: HookEvent)
| 347 | }; |
| 348 | |
| 349 | const addDirectCommand = (event: HookEvent) => { |
| 350 | // Only for events without matchers |
| 351 | if (!directEvents.includes(event as any)) return; |
| 352 | |
| 353 | const newCommand: EditableHookCommand = { |
| 354 | id: HooksManager.generateId(), |
| 355 | type: 'command', |
| 356 | command: '' |
| 357 | }; |
| 358 | |
| 359 | setEditableHooks(prev => ({ |
| 360 | ...prev, |
| 361 | [event]: [...(prev[event as 'Notification' | 'Stop' | 'SubagentStop'] as EditableHookCommand[]), newCommand] |
| 362 | })); |
| 363 | }; |
| 364 | |
| 365 | const updateMatcher = (event: HookEvent, matcherId: string, updates: Partial<EditableHookMatcher>) => { |
| 366 | if (!matcherEvents.includes(event as any)) return; |
no test coverage detected