align stop hook with claude and add test

This commit is contained in:
DennisYu07 2026-02-26 19:14:25 -08:00
parent e63ad35bb7
commit 48e55e5c30
8 changed files with 1334 additions and 115 deletions

View file

@ -1,6 +1,6 @@
/**
* @license
* Copyright 2025 Google LLC
* Copyright 2026 Qwen
* SPDX-License-Identifier: Apache-2.0
*/
@ -188,14 +188,12 @@ export class HookSystem {
}
async fireStopEvent(
prompt: string,
response: string,
stopHookActive: boolean = false,
lastAssistantMessage: string = '',
): Promise<DefaultHookOutput | undefined> {
const result = await this.hookEventHandler.fireStopEvent(
prompt,
response,
stopHookActive,
lastAssistantMessage,
);
return result.finalOutput
? createHookOutput('Stop', result.finalOutput)