Merge remote-tracking branch 'origin/main' into feat/npm-extension-installation

This commit is contained in:
tanzhenxin 2026-03-30 19:16:08 +08:00
commit 2c1432a23a
47 changed files with 1056 additions and 253 deletions

View file

@ -1770,6 +1770,15 @@ export class Config {
return this.hookSystem;
}
/**
* Fast-path check: returns true only when hooks are enabled AND there are
* registered hooks for the given event name. Callers can use this to skip
* expensive MessageBus round-trips when no hooks are configured.
*/
hasHooksForEvent(eventName: string): boolean {
return this.hookSystem?.hasHooksForEvent(eventName) ?? false;
}
/**
* Check if hooks are enabled.
*/