ai 6.0.0-beta.92 → 6.0.0-beta.94
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 +15 -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 +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.0-beta.94
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ab1087b: feat(ai): `chat.addToolResult()` is now `chat.addToolOutput()`
|
|
8
|
+
|
|
9
|
+
## 6.0.0-beta.93
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Updated dependencies [bb36798]
|
|
14
|
+
- @ai-sdk/provider@3.0.0-beta.15
|
|
15
|
+
- @ai-sdk/gateway@2.0.0-beta.50
|
|
16
|
+
- @ai-sdk/provider-utils@4.0.0-beta.31
|
|
17
|
+
|
|
3
18
|
## 6.0.0-beta.92
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -3020,6 +3020,20 @@ declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
3020
3020
|
*/
|
|
3021
3021
|
clearError: () => void;
|
|
3022
3022
|
addToolApprovalResponse: ChatAddToolApproveResponseFunction;
|
|
3023
|
+
addToolOutput: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
3024
|
+
state?: "output-available";
|
|
3025
|
+
tool: TOOL;
|
|
3026
|
+
toolCallId: string;
|
|
3027
|
+
output: InferUIMessageTools<UI_MESSAGE>[TOOL]["output"];
|
|
3028
|
+
errorText?: never;
|
|
3029
|
+
} | {
|
|
3030
|
+
state: "output-error";
|
|
3031
|
+
tool: TOOL;
|
|
3032
|
+
toolCallId: string;
|
|
3033
|
+
output?: never;
|
|
3034
|
+
errorText: string;
|
|
3035
|
+
}) => Promise<void>;
|
|
3036
|
+
/** @deprecated Use addToolOutput */
|
|
3023
3037
|
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
3024
3038
|
state?: "output-available";
|
|
3025
3039
|
tool: TOOL;
|
package/dist/index.d.ts
CHANGED
|
@@ -3020,6 +3020,20 @@ declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
3020
3020
|
*/
|
|
3021
3021
|
clearError: () => void;
|
|
3022
3022
|
addToolApprovalResponse: ChatAddToolApproveResponseFunction;
|
|
3023
|
+
addToolOutput: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
3024
|
+
state?: "output-available";
|
|
3025
|
+
tool: TOOL;
|
|
3026
|
+
toolCallId: string;
|
|
3027
|
+
output: InferUIMessageTools<UI_MESSAGE>[TOOL]["output"];
|
|
3028
|
+
errorText?: never;
|
|
3029
|
+
} | {
|
|
3030
|
+
state: "output-error";
|
|
3031
|
+
tool: TOOL;
|
|
3032
|
+
toolCallId: string;
|
|
3033
|
+
output?: never;
|
|
3034
|
+
errorText: string;
|
|
3035
|
+
}) => Promise<void>;
|
|
3036
|
+
/** @deprecated Use addToolOutput */
|
|
3023
3037
|
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ state, tool, toolCallId, output, errorText, }: {
|
|
3024
3038
|
state?: "output-available";
|
|
3025
3039
|
tool: TOOL;
|
package/dist/index.js
CHANGED
|
@@ -858,7 +858,7 @@ function detectMediaType({
|
|
|
858
858
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
859
859
|
|
|
860
860
|
// src/version.ts
|
|
861
|
-
var VERSION = true ? "6.0.0-beta.
|
|
861
|
+
var VERSION = true ? "6.0.0-beta.94" : "0.0.0-test";
|
|
862
862
|
|
|
863
863
|
// src/util/download/download.ts
|
|
864
864
|
var download = async ({ url }) => {
|
|
@@ -10921,7 +10921,7 @@ var AbstractChat = class {
|
|
|
10921
10921
|
});
|
|
10922
10922
|
}
|
|
10923
10923
|
});
|
|
10924
|
-
this.
|
|
10924
|
+
this.addToolOutput = async ({
|
|
10925
10925
|
state = "output-available",
|
|
10926
10926
|
tool: tool2,
|
|
10927
10927
|
toolCallId,
|
|
@@ -10946,6 +10946,8 @@ var AbstractChat = class {
|
|
|
10946
10946
|
});
|
|
10947
10947
|
}
|
|
10948
10948
|
});
|
|
10949
|
+
/** @deprecated Use addToolOutput */
|
|
10950
|
+
this.addToolResult = this.addToolOutput;
|
|
10949
10951
|
/**
|
|
10950
10952
|
* Abort the current request immediately, keep the generated tokens if any.
|
|
10951
10953
|
*/
|