diff options
| author | Taylor Mullen <[email protected]> | 2025-05-26 14:33:35 -0700 |
|---|---|---|
| committer | N. Taylor Mullen <[email protected]> | 2025-05-26 14:37:13 -0700 |
| commit | c92d4edb8956e9040abf55060d90e52a1572f435 (patch) | |
| tree | 907ad8a515717caf4176079f1f6a1b4e97e2cbcc /packages/server/src | |
| parent | 597dc86a9c7011b7f3288445b14abb11817424da (diff) | |
Fix(chat): Ensure model responds when next speaker check indicates
- Corrects an issue where the `nextSpeakerCheck` would determine the model should speak next, but the models response was not properly propagated due to a missing `yield*` in a recursive call within `sendMessageStream`.
- This change ensures that when the model is designated as the next speaker, its generated content is correctly unwoven and returned, allowing the conversation to proceed as expected.
Part of https://github.com/google-gemini/gemini-cli/issues/551
Diffstat (limited to 'packages/server/src')
| -rw-r--r-- | packages/server/src/core/client.ts | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/packages/server/src/core/client.ts b/packages/server/src/core/client.ts index 3d5927e3..8823012e 100644 --- a/packages/server/src/core/client.ts +++ b/packages/server/src/core/client.ts @@ -170,7 +170,7 @@ export class GeminiClient { const nextSpeakerCheck = await checkNextSpeaker(chat, this); if (nextSpeakerCheck?.next_speaker === 'model') { const nextRequest = [{ text: 'Please continue.' }]; - return this.sendMessageStream(chat, nextRequest, signal, turns - 1); + yield* this.sendMessageStream(chat, nextRequest, signal, turns - 1); } } } |
