ai 7.0.5 → 7.0.7
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 +14 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +1 -1
- package/docs/03-ai-sdk-core/40-middleware.mdx +15 -7
- package/docs/04-ai-sdk-ui/03-chatbot-message-persistence.mdx +11 -2
- package/docs/07-reference/01-ai-sdk-core/65-language-model-v2-middleware.mdx +2 -2
- package/package.json +2 -2
- package/src/agent/agent.ts +14 -0
- package/src/ui/convert-to-model-messages.ts +6 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- d598481: Fix: `convertToModelMessages` no longer emits an empty assistant message when a block contains only unknown data parts (e.g. a data part before `step-start` with no `convertDataPart` provided)
|
|
8
|
+
|
|
9
|
+
## 7.0.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 989402d: Add ToolLoopAgent types for deprecated tool call callback aliases.
|
|
14
|
+
- Updated dependencies [7e3c99e]
|
|
15
|
+
- @ai-sdk/gateway@4.0.5
|
|
16
|
+
|
|
3
17
|
## 7.0.5
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -4642,10 +4642,22 @@ type AgentCallParameters<CALL_OPTIONS, TOOLS extends ToolSet = {}, RUNTIME_CONTE
|
|
|
4642
4642
|
* Callback that is called before each tool execution begins.
|
|
4643
4643
|
*/
|
|
4644
4644
|
onToolExecutionStart?: OnToolExecutionStartCallback<TOOLS>;
|
|
4645
|
+
/**
|
|
4646
|
+
* Callback that is called before each tool execution begins.
|
|
4647
|
+
*
|
|
4648
|
+
* @deprecated Use `onToolExecutionStart` instead.
|
|
4649
|
+
*/
|
|
4650
|
+
experimental_onToolCallStart?: OnToolExecutionStartCallback<TOOLS>;
|
|
4645
4651
|
/**
|
|
4646
4652
|
* Callback that is called after each tool execution completes.
|
|
4647
4653
|
*/
|
|
4648
4654
|
onToolExecutionEnd?: OnToolExecutionEndCallback<TOOLS>;
|
|
4655
|
+
/**
|
|
4656
|
+
* Callback that is called after each tool execution completes.
|
|
4657
|
+
*
|
|
4658
|
+
* @deprecated Use `onToolExecutionEnd` instead.
|
|
4659
|
+
*/
|
|
4660
|
+
experimental_onToolCallFinish?: OnToolExecutionEndCallback<TOOLS>;
|
|
4649
4661
|
/**
|
|
4650
4662
|
* Callback that is called when each step (LLM call) ends, including intermediate steps.
|
|
4651
4663
|
*/
|
package/dist/index.js
CHANGED
|
@@ -1089,7 +1089,7 @@ import {
|
|
|
1089
1089
|
} from "@ai-sdk/provider-utils";
|
|
1090
1090
|
|
|
1091
1091
|
// src/version.ts
|
|
1092
|
-
var VERSION = true ? "7.0.
|
|
1092
|
+
var VERSION = true ? "7.0.7" : "0.0.0-test";
|
|
1093
1093
|
|
|
1094
1094
|
// src/util/download/download.ts
|
|
1095
1095
|
var download = async ({
|
|
@@ -10458,10 +10458,12 @@ async function convertToModelMessages(messages, options) {
|
|
|
10458
10458
|
throw new Error(`Unsupported part: ${_exhaustiveCheck}`);
|
|
10459
10459
|
}
|
|
10460
10460
|
}
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10461
|
+
if (content.length > 0) {
|
|
10462
|
+
modelMessages.push({
|
|
10463
|
+
role: "assistant",
|
|
10464
|
+
content
|
|
10465
|
+
});
|
|
10466
|
+
}
|
|
10465
10467
|
const toolParts = block.filter(
|
|
10466
10468
|
(part) => {
|
|
10467
10469
|
var _a23;
|