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

PunctuationStrategy

Class: PunctuationStrategy

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

Punctuation Strategy - emit when chunk contains punctuation Useful for natural text flow in UI

Implements

Constructors

Constructor

ts
new PunctuationStrategy(): PunctuationStrategy;
new PunctuationStrategy(): PunctuationStrategy;

Returns

PunctuationStrategy

Methods

shouldEmit()

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

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

Called for each text chunk received

Parameters

chunk

string

The new chunk of text (delta)

_accumulated

string

Returns

boolean

true if an update should be emitted now

Implementation of

ChunkStrategy.shouldEmit