MCPcopy Index your code
hub / github.com/continuedev/continue / fireEvent

Method fireEvent

extensions/cli/src/hooks/HookService.ts:77–94  ·  view source on GitHub ↗

* Fire a hook event and return the aggregated result. * * This is the main entry point used by all integration points. * Returns a no-op result if hooks are disabled.

(input: HookInput)

Source from the content-addressed store, hash-verified

75 * Returns a no-op result if hooks are disabled.
76 */
77 async fireEvent(input: HookInput): Promise<HookEventResult> {
78 if (this.currentState.disabled) {
79 return { blocked: false, results: [] };
80 }
81
82 if (Object.keys(this.currentState.config).length === 0) {
83 return { blocked: false, results: [] };
84 }
85
86 try {
87 const result = await runHooks(this.currentState.config, input, this.cwd);
88 return result;
89 } catch (error) {
90 logger.warn(`Hook event ${input.hook_event_name} failed:`, error);
91 // Hook errors should not break the main flow
92 return { blocked: false, results: [] };
93 }
94 }
95
96 /**
97 * Reload hooks config from disk (e.g., after config file changes).

Callers 9

firePreToolUseFunction · 0.80
firePostToolUseFunction · 0.80
firePostToolUseFailureFunction · 0.80
fireUserPromptSubmitFunction · 0.80
fireSessionStartFunction · 0.80
fireSessionEndFunction · 0.80
fireStopFunction · 0.80
fireNotificationFunction · 0.80
firePreCompactFunction · 0.80

Calls 2

runHooksFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected