feat(hooks): simplify hook firing with HookSystem wrapper methods (#15982)

Co-authored-by: Ishaan Gupta <ishaankone@gmail.com>
This commit is contained in:
Vedant Mahajan
2026-01-08 00:41:49 +05:30
committed by GitHub
parent 57012ae5b3
commit c64b5ec4a3
4 changed files with 72 additions and 34 deletions
+10
View File
@@ -269,6 +269,7 @@ describe('gemini.tsx main function', () => {
subscribe: vi.fn(),
}),
getEnableHooks: () => false,
getHookSystem: () => undefined,
getToolRegistry: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getModel: () => 'gemini-pro',
@@ -505,6 +506,7 @@ describe('gemini.tsx main function kitty protocol', () => {
subscribe: vi.fn(),
}),
getEnableHooks: () => false,
getHookSystem: () => undefined,
getToolRegistry: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getModel: () => 'gemini-pro',
@@ -609,6 +611,7 @@ describe('gemini.tsx main function kitty protocol', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
initialize: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getMcpServers: () => ({}),
@@ -692,6 +695,7 @@ describe('gemini.tsx main function kitty protocol', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
initialize: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getMcpServers: () => ({}),
@@ -760,6 +764,7 @@ describe('gemini.tsx main function kitty protocol', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
initialize: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getMcpServers: () => ({}),
@@ -843,6 +848,7 @@ describe('gemini.tsx main function kitty protocol', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
initialize: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getMcpServers: () => ({}),
@@ -923,6 +929,7 @@ describe('gemini.tsx main function kitty protocol', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
initialize: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getMcpServers: () => ({}),
@@ -997,6 +1004,7 @@ describe('gemini.tsx main function kitty protocol', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
initialize: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getMcpServers: () => ({}),
@@ -1170,6 +1178,7 @@ describe('gemini.tsx main function exit codes', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
getToolRegistry: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getModel: () => 'gemini-pro',
@@ -1234,6 +1243,7 @@ describe('gemini.tsx main function exit codes', () => {
getPolicyEngine: vi.fn(),
getMessageBus: () => ({ subscribe: vi.fn() }),
getEnableHooks: () => false,
getHookSystem: () => undefined,
getToolRegistry: vi.fn(),
getContentGeneratorConfig: vi.fn(),
getModel: () => 'gemini-pro',