ai 6.0.250 → 6.0.253
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/CHANGELOG.md +24 -0
- package/dist/index.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +14 -11
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +14 -11
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/02-foundations/02-providers-and-models.mdx +1 -0
- package/docs/07-reference/01-ai-sdk-core/31-ui-message.mdx +4 -0
- package/package.json +2 -2
- package/src/agent/tool-loop-agent-settings.ts +1 -0
- package/src/agent/tool-loop-agent.ts +8 -4
- package/src/types/provider.ts +1 -1
- package/src/ui/chat.ts +5 -7
- package/src/ui/process-ui-message-stream.ts +1 -0
- package/src/ui/ui-messages.ts +5 -0
- package/src/ui/validate-ui-messages.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -1193,7 +1193,7 @@ import {
|
|
|
1193
1193
|
} from "@ai-sdk/provider-utils";
|
|
1194
1194
|
|
|
1195
1195
|
// src/version.ts
|
|
1196
|
-
var VERSION = true ? "6.0.
|
|
1196
|
+
var VERSION = true ? "6.0.253" : "0.0.0-test";
|
|
1197
1197
|
|
|
1198
1198
|
// src/util/download/download.ts
|
|
1199
1199
|
var download = async ({
|
|
@@ -5949,6 +5949,7 @@ function processUIMessageStream({
|
|
|
5949
5949
|
case "reasoning-start": {
|
|
5950
5950
|
const reasoningPart = {
|
|
5951
5951
|
type: "reasoning",
|
|
5952
|
+
id: chunk.id,
|
|
5952
5953
|
text: "",
|
|
5953
5954
|
providerMetadata: chunk.providerMetadata,
|
|
5954
5955
|
state: "streaming"
|
|
@@ -8838,10 +8839,11 @@ var ToolLoopAgent = class {
|
|
|
8838
8839
|
onStepFinish,
|
|
8839
8840
|
...options
|
|
8840
8841
|
}) {
|
|
8842
|
+
const preparedCall = await this.prepareCall(options);
|
|
8841
8843
|
return generateText({
|
|
8842
|
-
...
|
|
8844
|
+
...preparedCall,
|
|
8843
8845
|
abortSignal,
|
|
8844
|
-
timeout,
|
|
8846
|
+
timeout: timeout != null ? timeout : preparedCall.timeout,
|
|
8845
8847
|
onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)
|
|
8846
8848
|
});
|
|
8847
8849
|
}
|
|
@@ -8855,10 +8857,11 @@ var ToolLoopAgent = class {
|
|
|
8855
8857
|
onStepFinish,
|
|
8856
8858
|
...options
|
|
8857
8859
|
}) {
|
|
8860
|
+
const preparedCall = await this.prepareCall(options);
|
|
8858
8861
|
return streamText({
|
|
8859
|
-
...
|
|
8862
|
+
...preparedCall,
|
|
8860
8863
|
abortSignal,
|
|
8861
|
-
timeout,
|
|
8864
|
+
timeout: timeout != null ? timeout : preparedCall.timeout,
|
|
8862
8865
|
experimental_transform,
|
|
8863
8866
|
onStepFinish: this.mergeOnStepFinishCallbacks(onStepFinish)
|
|
8864
8867
|
});
|
|
@@ -9274,6 +9277,7 @@ var uiMessagesSchema = lazySchema2(
|
|
|
9274
9277
|
}),
|
|
9275
9278
|
z8.object({
|
|
9276
9279
|
type: z8.literal("reasoning"),
|
|
9280
|
+
id: z8.string().optional(),
|
|
9277
9281
|
text: z8.string(),
|
|
9278
9282
|
state: z8.enum(["streaming", "done"]).optional(),
|
|
9279
9283
|
providerMetadata: providerMetadataSchema.optional()
|
|
@@ -14137,13 +14141,12 @@ var AbstractChat = class {
|
|
|
14137
14141
|
finishReason: activeResponse.state.finishReason
|
|
14138
14142
|
});
|
|
14139
14143
|
}
|
|
14140
|
-
}
|
|
14141
|
-
|
|
14142
|
-
|
|
14143
|
-
|
|
14144
|
-
|
|
14144
|
+
} finally {
|
|
14145
|
+
if (this.activeResponse === activeResponse) {
|
|
14146
|
+
this.activeResponse = void 0;
|
|
14147
|
+
}
|
|
14148
|
+
clearActiveResumeRequest();
|
|
14145
14149
|
}
|
|
14146
|
-
clearActiveResumeRequest();
|
|
14147
14150
|
}
|
|
14148
14151
|
if (!isError && await this.shouldSendAutomatically()) {
|
|
14149
14152
|
await this.makeRequest({
|