MessageV2.stream is a synchronous generator, so wrapping it in Effect.promise with `for await` is an unnecessary async roundtrip. Use Effect.sync with a plain `for` loop instead.
To install dependencies:
bun install
To run:
bun run index.ts
This project was created using bun init in bun v1.2.12. Bun is a fast all-in-one JavaScript runtime.
bun init