mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-17 13:30:53 -07:00
fix(cli): consume the stream returned by send
This commit is contained in:
committed by
Adam Weidman
parent
6d8cee7620
commit
c3b5bcb84c
@@ -294,7 +294,7 @@ export async function runNonInteractive({
|
||||
});
|
||||
|
||||
// Start the agentic loop (runs in background)
|
||||
await session.send({
|
||||
const { streamId } = await session.send({
|
||||
message: geminiPartsToContentParts(query),
|
||||
});
|
||||
|
||||
@@ -351,7 +351,7 @@ export async function runNonInteractive({
|
||||
// Consume AgentEvents for output formatting
|
||||
let responseText = '';
|
||||
let streamEnded = false;
|
||||
for await (const event of session.stream()) {
|
||||
for await (const event of session.stream({ streamId })) {
|
||||
if (streamEnded) break;
|
||||
switch (event.type) {
|
||||
case 'message': {
|
||||
|
||||
Reference in New Issue
Block a user