mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
align stop hook with claude and add test
This commit is contained in:
parent
e63ad35bb7
commit
48e55e5c30
8 changed files with 1334 additions and 115 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue