ai 4.0.30 → 4.0.32
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 +17 -0
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
@@ -3317,6 +3317,7 @@ var ToolExecutionError = class extends AISDKError9 {
|
|
3317
3317
|
constructor({
|
3318
3318
|
toolArgs,
|
3319
3319
|
toolName,
|
3320
|
+
toolCallId,
|
3320
3321
|
cause,
|
3321
3322
|
message = `Error executing tool ${toolName}: ${getErrorMessage2(cause)}`
|
3322
3323
|
}) {
|
@@ -3324,6 +3325,7 @@ var ToolExecutionError = class extends AISDKError9 {
|
|
3324
3325
|
this[_a9] = true;
|
3325
3326
|
this.toolArgs = toolArgs;
|
3326
3327
|
this.toolName = toolName;
|
3328
|
+
this.toolCallId = toolCallId;
|
3327
3329
|
}
|
3328
3330
|
static isInstance(error) {
|
3329
3331
|
return AISDKError9.hasMarker(error, marker9);
|
@@ -3946,6 +3948,7 @@ async function executeTools({
|
|
3946
3948
|
return result2;
|
3947
3949
|
} catch (error) {
|
3948
3950
|
throw new ToolExecutionError({
|
3951
|
+
toolCallId,
|
3949
3952
|
toolName,
|
3950
3953
|
toolArgs: args,
|
3951
3954
|
cause: error
|
@@ -4304,6 +4307,7 @@ function runToolsTransformation({
|
|
4304
4307
|
toolResultsStreamController.enqueue({
|
4305
4308
|
type: "error",
|
4306
4309
|
error: new ToolExecutionError({
|
4310
|
+
toolCallId: toolCall.toolCallId,
|
4307
4311
|
toolName: toolCall.toolName,
|
4308
4312
|
toolArgs: toolCall.args,
|
4309
4313
|
cause: error
|