Docs
Code Rabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
Sentry
Prisma
Strapi
Unkey
UI.dev
Code Rabbit
Cloudflare
AG Grid
Netlify
Neon
WorkOS
Clerk
Convex
Electric
Sentry
Prisma
Strapi
Unkey
UI.dev
Class References
Function References
Interface References
Type Alias References
Variable References
Class References

ImmediateStrategy

Class: ImmediateStrategy

Defined in: activities/chat/stream/strategies.ts:12

Immediate Strategy - emit on every chunk (default behavior)

Implements

Constructors

Constructor

ts
new ImmediateStrategy(): ImmediateStrategy;
new ImmediateStrategy(): ImmediateStrategy;

Returns

ImmediateStrategy

Methods

shouldEmit()

ts
shouldEmit(_chunk, _accumulated): boolean;
shouldEmit(_chunk, _accumulated): boolean;

Defined in: activities/chat/stream/strategies.ts:13

Called for each text chunk received

Parameters

_chunk

string

_accumulated

string

Returns

boolean

true if an update should be emitted now

Implementation of

ChunkStrategy.shouldEmit