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 })