Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

EmitCustomEventOptions.md

26 lines801 Bytes

1---
2id: EmitCustomEventOptions
3title: EmitCustomEventOptions
4---
5​
6Defined in: [packages/ai/src/types.ts:670](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L670)
7​
8Options for a single `emitCustomEvent` call, on both the tool-execution and
9middleware contexts.
10​
11## Properties
12​
13### batch?
14​
15```ts
16optional batch?: boolean;
17```
18​
19Defined in: [packages/ai/src/types.ts:679](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L679)
20​
21Keep this event in the durability batch with later chunks.
22CUSTOM events flush as soon as they are emitted, so a progress
23indicator can render at emit time. Pass `{ batch: true }` for a
24high-volume stream that should share appends with later output.
25`process.stdout`, `process.stderr`, `sandbox.file`, and
26`sandbox.file.diff` already batch.