@trigger.dev/sdk 0.0.0-chat-prerelease-20260505140031 → 0.0.0-chat-prerelease-20260506093419
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/v3/ai.d.ts +9 -4
- package/dist/commonjs/v3/ai.js +666 -590
- package/dist/commonjs/v3/ai.js.map +1 -1
- package/dist/commonjs/v3/chat-client.d.ts +13 -5
- package/dist/commonjs/v3/chat-client.js +13 -5
- package/dist/commonjs/v3/chat-client.js.map +1 -1
- package/dist/commonjs/v3/chat.d.ts +5 -2
- package/dist/commonjs/v3/chat.js +5 -2
- package/dist/commonjs/v3/chat.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/ai.d.ts +9 -4
- package/dist/esm/v3/ai.js +666 -590
- package/dist/esm/v3/ai.js.map +1 -1
- package/dist/esm/v3/chat-client.d.ts +13 -5
- package/dist/esm/v3/chat-client.js +13 -5
- package/dist/esm/v3/chat-client.js.map +1 -1
- package/dist/esm/v3/chat.d.ts +5 -2
- package/dist/esm/v3/chat.js +5 -2
- package/dist/esm/v3/chat.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +2 -2
package/dist/commonjs/v3/ai.d.ts
CHANGED
|
@@ -1188,13 +1188,18 @@ export type ChatAgentOptions<TIdentifier extends string, TClientDataSchema exten
|
|
|
1188
1188
|
/**
|
|
1189
1189
|
* Called when the frontend sends a custom action via `transport.sendAction()`.
|
|
1190
1190
|
*
|
|
1191
|
-
*
|
|
1192
|
-
*
|
|
1193
|
-
*
|
|
1191
|
+
* Actions are not turns. They fire `hydrateMessages` (if configured) and
|
|
1192
|
+
* `onAction` only — no `onTurnStart` / `prepareMessages` /
|
|
1193
|
+
* `onBeforeTurnComplete` / `onTurnComplete`, no `run()`. Use
|
|
1194
|
+
* `chat.history.*` inside `onAction` to mutate state.
|
|
1195
|
+
*
|
|
1196
|
+
* To produce a model response from an action, return a
|
|
1197
|
+
* `StreamTextResult` (auto-piped), `string`, or `UIMessage`. Returning
|
|
1198
|
+
* `void` or nothing is the side-effect-only default.
|
|
1194
1199
|
*/
|
|
1195
1200
|
onAction?: (event: ActionEvent<[
|
|
1196
1201
|
TActionSchema
|
|
1197
|
-
] extends [TaskSchema] ? inferSchemaOut<TActionSchema> : unknown, inferSchemaOut<TClientDataSchema>, TUIMessage>) => Promise<
|
|
1202
|
+
] extends [TaskSchema] ? inferSchemaOut<TActionSchema> : unknown, inferSchemaOut<TClientDataSchema>, TUIMessage>) => Promise<unknown> | unknown;
|
|
1198
1203
|
/**
|
|
1199
1204
|
* The run function for the chat task.
|
|
1200
1205
|
*
|