@codelia/core 0.1.89 → 0.1.90
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/dist/index.cjs +7 -7
- package/dist/index.js +7 -7
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -3339,15 +3339,15 @@ var Agent = class {
|
|
|
3339
3339
|
}
|
|
3340
3340
|
for (const toolCall of toolCalls) {
|
|
3341
3341
|
stepNumber++;
|
|
3342
|
-
let jsonArgs
|
|
3342
|
+
let jsonArgs = {
|
|
3343
|
+
_raw: toolCall.function.arguments
|
|
3344
|
+
};
|
|
3343
3345
|
try {
|
|
3344
|
-
|
|
3346
|
+
const parsed = JSON.parse(toolCall.function.arguments);
|
|
3347
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed))
|
|
3348
|
+
jsonArgs = parsed;
|
|
3345
3349
|
} catch (e) {
|
|
3346
|
-
if (e instanceof SyntaxError)
|
|
3347
|
-
jsonArgs = { _raw: toolCall.function.arguments };
|
|
3348
|
-
} else {
|
|
3349
|
-
throw e;
|
|
3350
|
-
}
|
|
3350
|
+
if (!(e instanceof SyntaxError)) throw e;
|
|
3351
3351
|
}
|
|
3352
3352
|
const stepStartEvent = {
|
|
3353
3353
|
type: "step_start",
|
package/dist/index.js
CHANGED
|
@@ -3254,15 +3254,15 @@ var Agent = class {
|
|
|
3254
3254
|
}
|
|
3255
3255
|
for (const toolCall of toolCalls) {
|
|
3256
3256
|
stepNumber++;
|
|
3257
|
-
let jsonArgs
|
|
3257
|
+
let jsonArgs = {
|
|
3258
|
+
_raw: toolCall.function.arguments
|
|
3259
|
+
};
|
|
3258
3260
|
try {
|
|
3259
|
-
|
|
3261
|
+
const parsed = JSON.parse(toolCall.function.arguments);
|
|
3262
|
+
if (parsed && typeof parsed === "object" && !Array.isArray(parsed))
|
|
3263
|
+
jsonArgs = parsed;
|
|
3260
3264
|
} catch (e) {
|
|
3261
|
-
if (e instanceof SyntaxError)
|
|
3262
|
-
jsonArgs = { _raw: toolCall.function.arguments };
|
|
3263
|
-
} else {
|
|
3264
|
-
throw e;
|
|
3265
|
-
}
|
|
3265
|
+
if (!(e instanceof SyntaxError)) throw e;
|
|
3266
3266
|
}
|
|
3267
3267
|
const stepStartEvent = {
|
|
3268
3268
|
type: "step_start",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codelia/core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.90",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -26,8 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@anthropic-ai/sdk": "^0.110.0",
|
|
29
|
-
"@codelia/config": "0.1.
|
|
30
|
-
"@codelia/shared-types": "0.1.
|
|
29
|
+
"@codelia/config": "0.1.90",
|
|
30
|
+
"@codelia/shared-types": "0.1.90",
|
|
31
31
|
"@google/genai": "2.32.0",
|
|
32
32
|
"image-size": "^2.0.2",
|
|
33
33
|
"json-schema": "^0.4.0",
|