-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): polyfill Web Stream APIs #777
fix(core): polyfill Web Stream APIs #777
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
find a bug when running streaming mode, fixing
const output = stepOutput.output; | ||
if (output instanceof ReadableStream) { | ||
for await (const chunk of output) { | ||
process.stdout.write(chunk.delta); | ||
} | ||
} else { | ||
console.log(output); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems ugly to use, but since this not for user side API, I think it's okay for now
feedback from: https://discord.com/channels/1059199217496772688/1133167189860565033/1233430729879453738
Reason is lower version typescript doesn't have built-in async iterator support for Readable Stream
This PR will restrict the type check by set
types
to empty array, and remove "DOM" on the top config to make sure each sub-module uses correct types