mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
fix: Stream parsing for Windows Zed integration (#10339)
This commit is contained in:
@@ -7,7 +7,6 @@
|
|||||||
/* ACP defines a schema for a simple (experimental) JSON-RPC protocol that allows GUI applications to interact with agents. */
|
/* ACP defines a schema for a simple (experimental) JSON-RPC protocol that allows GUI applications to interact with agents. */
|
||||||
|
|
||||||
import { z } from 'zod';
|
import { z } from 'zod';
|
||||||
import { EOL } from 'node:os';
|
|
||||||
import * as schema from './schema.js';
|
import * as schema from './schema.js';
|
||||||
export * from './schema.js';
|
export * from './schema.js';
|
||||||
|
|
||||||
@@ -173,7 +172,7 @@ class Connection {
|
|||||||
const decoder = new TextDecoder();
|
const decoder = new TextDecoder();
|
||||||
for await (const chunk of output) {
|
for await (const chunk of output) {
|
||||||
content += decoder.decode(chunk, { stream: true });
|
content += decoder.decode(chunk, { stream: true });
|
||||||
const lines = content.split(EOL);
|
const lines = content.split('\n');
|
||||||
content = lines.pop() || '';
|
content = lines.pop() || '';
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
|
|||||||
Reference in New Issue
Block a user