There was an error while loading. Please reload this page.
1 parent 9f8015e commit cc9f8c6Copy full SHA for cc9f8c6
1 file changed
packages/trigger-sdk/src/v3/ai.ts
@@ -5523,6 +5523,13 @@ export type ChatAgentOptions<
5523
* },
5524
* });
5525
* ```
5526
+ *
5527
+ * Note: on a channel HITL resume turn (a button click that lands on a fresh
5528
+ * run whose accumulator doesn't yet hold the pending tool call), this hook is
5529
+ * called twice for the one delivery: once with `incomingMessages: []` to load
5530
+ * the chain and locate the pending tool call, then again with the synthesized
5531
+ * resolution message so it can be persisted. Keep the hook's read path
5532
+ * idempotent.
5533
*/
5534
hydrateMessages?: (
5535
event: HydrateMessagesEvent<inferSchemaOut<TClientDataSchema>, TUIMessage>
0 commit comments