Skip to content

Commit b6c721d

Browse files
Use process.stdout.write for streaming without newlines
1 parent 63ceed4 commit b6c721d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

typescript/effect-ai/src/basic/example.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ const program = Effect.gen(function* () {
7272
Stream.runForEach((part) => {
7373
// Only print text deltas to show streaming effect
7474
if (part.type === 'text-delta') {
75-
return Console.log(part.delta);
75+
return Effect.sync(() => process.stdout.write(part.delta));
7676
}
7777
// Log other part types for demonstration
7878
return Console.log(`[${part.type}]`);

0 commit comments

Comments
 (0)