Open History to see the last commit
1---
2id: EmitCustomEventOptions
3title: EmitCustomEventOptions
4---
5
6Defined in: packages/ai/src/types.ts:847
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:856
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.