From a5375e5d55db3cf702808c963d6ccc6f8bccf742 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Wed, 1 Mar 2023 21:50:22 -0600 Subject: [PATCH] fix: cli streaming issue --- legacy/bin/cli.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/legacy/bin/cli.js b/legacy/bin/cli.js index 8be704c4..4692bf89 100755 --- a/legacy/bin/cli.js +++ b/legacy/bin/cli.js @@ -87,8 +87,9 @@ async function main() { timeoutMs: options.timeout || undefined, onProgress: options.stream ? (progress) => { - const { text } = progress.detail.choices[0] - process.stdout.write(text) + if (progress.delta) { + process.stdout.write(progress.delta) + } } : undefined })