ai 5.0.18 → 5.0.20
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 +12 -0
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1774,11 +1774,13 @@ async function parseToolCall({
|
|
1774
1774
|
return await doParseToolCall({ toolCall: repairedToolCall, tools });
|
1775
1775
|
}
|
1776
1776
|
} catch (error) {
|
1777
|
+
const parsedInput = await safeParseJSON({ text: toolCall.input });
|
1778
|
+
const input = parsedInput.success ? parsedInput.value : toolCall.input;
|
1777
1779
|
return {
|
1778
1780
|
type: "tool-call",
|
1779
1781
|
toolCallId: toolCall.toolCallId,
|
1780
1782
|
toolName: toolCall.toolName,
|
1781
|
-
input
|
1783
|
+
input,
|
1782
1784
|
dynamic: true,
|
1783
1785
|
invalid: true,
|
1784
1786
|
error
|
@@ -7052,6 +7054,7 @@ var DefaultStreamObjectResult = class {
|
|
7052
7054
|
case "response-metadata":
|
7053
7055
|
case "finish":
|
7054
7056
|
case "error":
|
7057
|
+
case "stream-start":
|
7055
7058
|
controller.enqueue(chunk);
|
7056
7059
|
break;
|
7057
7060
|
}
|
@@ -7190,6 +7193,7 @@ var DefaultStreamObjectResult = class {
|
|
7190
7193
|
});
|
7191
7194
|
self._usage.resolve(usage);
|
7192
7195
|
self._providerMetadata.resolve(providerMetadata);
|
7196
|
+
self._warnings.resolve(warnings);
|
7193
7197
|
self._response.resolve({
|
7194
7198
|
...fullResponse,
|
7195
7199
|
headers: response == null ? void 0 : response.headers
|