ai 5.0.88 → 5.0.89
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 +6 -0
- package/dist/index.d.mts +14 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -4195,6 +4195,20 @@ declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
4195
4195
|
* Clear the error state and set the status to ready if the chat is in an error state.
|
|
4196
4196
|
*/
|
|
4197
4197
|
clearError: () => void;
|
|
4198
|
+
addToolOutput: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
4199
|
+
state?: "output-available";
|
|
4200
|
+
tool: TOOL;
|
|
4201
|
+
toolCallId: string;
|
|
4202
|
+
output: InferUIMessageTools<UI_MESSAGE>[TOOL]["output"];
|
|
4203
|
+
errorText?: never;
|
|
4204
|
+
} | {
|
|
4205
|
+
state: "output-error";
|
|
4206
|
+
tool: TOOL;
|
|
4207
|
+
toolCallId: string;
|
|
4208
|
+
output?: never;
|
|
4209
|
+
errorText: string;
|
|
4210
|
+
}) => Promise<void>;
|
|
4211
|
+
/** @deprecated Use addToolOutput */
|
|
4198
4212
|
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
4199
4213
|
state?: "output-available";
|
|
4200
4214
|
tool: TOOL;
|
package/dist/index.d.ts
CHANGED
|
@@ -4195,6 +4195,20 @@ declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
4195
4195
|
* Clear the error state and set the status to ready if the chat is in an error state.
|
|
4196
4196
|
*/
|
|
4197
4197
|
clearError: () => void;
|
|
4198
|
+
addToolOutput: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
4199
|
+
state?: "output-available";
|
|
4200
|
+
tool: TOOL;
|
|
4201
|
+
toolCallId: string;
|
|
4202
|
+
output: InferUIMessageTools<UI_MESSAGE>[TOOL]["output"];
|
|
4203
|
+
errorText?: never;
|
|
4204
|
+
} | {
|
|
4205
|
+
state: "output-error";
|
|
4206
|
+
tool: TOOL;
|
|
4207
|
+
toolCallId: string;
|
|
4208
|
+
output?: never;
|
|
4209
|
+
errorText: string;
|
|
4210
|
+
}) => Promise<void>;
|
|
4211
|
+
/** @deprecated Use addToolOutput */
|
|
4198
4212
|
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
4199
4213
|
state?: "output-available";
|
|
4200
4214
|
tool: TOOL;
|
package/dist/index.js
CHANGED
|
@@ -764,7 +764,7 @@ function detectMediaType({
|
|
|
764
764
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
765
765
|
|
|
766
766
|
// src/version.ts
|
|
767
|
-
var VERSION = true ? "5.0.
|
|
767
|
+
var VERSION = true ? "5.0.89" : "0.0.0-test";
|
|
768
768
|
|
|
769
769
|
// src/util/download/download.ts
|
|
770
770
|
var download = async ({ url }) => {
|
|
@@ -9267,7 +9267,7 @@ var AbstractChat = class {
|
|
|
9267
9267
|
this.setStatus({ status: "ready" });
|
|
9268
9268
|
}
|
|
9269
9269
|
};
|
|
9270
|
-
this.
|
|
9270
|
+
this.addToolOutput = async ({
|
|
9271
9271
|
state = "output-available",
|
|
9272
9272
|
tool: tool2,
|
|
9273
9273
|
toolCallId,
|
|
@@ -9300,6 +9300,8 @@ var AbstractChat = class {
|
|
|
9300
9300
|
});
|
|
9301
9301
|
}
|
|
9302
9302
|
});
|
|
9303
|
+
/** @deprecated Use addToolOutput */
|
|
9304
|
+
this.addToolResult = this.addToolOutput;
|
|
9303
9305
|
/**
|
|
9304
9306
|
* Abort the current request immediately, keep the generated tokens if any.
|
|
9305
9307
|
*/
|