mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-16 17:11:04 -07:00
Add other hook wrapper methods to hooksystem (#16361)
This commit is contained in:
@@ -117,4 +117,28 @@ export class HookSystem {
|
||||
}
|
||||
return this.hookEventHandler.firePreCompressEvent(trigger);
|
||||
}
|
||||
|
||||
async fireBeforeAgentEvent(
|
||||
prompt: string,
|
||||
): Promise<AggregatedHookResult | undefined> {
|
||||
if (!this.config.getEnableHooks()) {
|
||||
return undefined;
|
||||
}
|
||||
return this.hookEventHandler.fireBeforeAgentEvent(prompt);
|
||||
}
|
||||
|
||||
async fireAfterAgentEvent(
|
||||
prompt: string,
|
||||
response: string,
|
||||
stopHookActive: boolean = false,
|
||||
): Promise<AggregatedHookResult | undefined> {
|
||||
if (!this.config.getEnableHooks()) {
|
||||
return undefined;
|
||||
}
|
||||
return this.hookEventHandler.fireAfterAgentEvent(
|
||||
prompt,
|
||||
response,
|
||||
stopHookActive,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user