mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-05 23:42:03 +00:00
add systemMessage for jook
This commit is contained in:
parent
b87c731487
commit
7573e1b0bd
1 changed files with 8 additions and 8 deletions
|
|
@ -722,6 +722,14 @@ export class GeminiClient {
|
|||
|
||||
const stopOutput = hookOutput as StopHookOutput | undefined;
|
||||
|
||||
// This should happen regardless of the hook's decision
|
||||
if (stopOutput?.systemMessage) {
|
||||
yield {
|
||||
type: GeminiEventType.HookSystemMessage,
|
||||
value: stopOutput.systemMessage,
|
||||
};
|
||||
}
|
||||
|
||||
// For Stop hooks, blocking/stop execution should force continuation
|
||||
if (
|
||||
stopOutput?.isBlockingDecision() ||
|
||||
|
|
@ -732,14 +740,6 @@ export class GeminiClient {
|
|||
return turn;
|
||||
}
|
||||
|
||||
// Emit system message if provided (e.g., "🔄 Ralph iteration 5")
|
||||
if (stopOutput.systemMessage) {
|
||||
yield {
|
||||
type: GeminiEventType.HookSystemMessage,
|
||||
value: stopOutput.systemMessage,
|
||||
};
|
||||
}
|
||||
|
||||
const continueReason = stopOutput.getEffectiveReason();
|
||||
const continueRequest = [{ text: continueReason }];
|
||||
return yield* this.sendMessageStream(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue