botholomew 0.6.0 → 0.6.1
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/package.json +1 -1
- package/src/daemon/llm.ts +10 -1
package/package.json
CHANGED
package/src/daemon/llm.ts
CHANGED
|
@@ -259,7 +259,16 @@ async function executeToolCall(
|
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
|
|
262
|
-
|
|
262
|
+
let result: unknown;
|
|
263
|
+
try {
|
|
264
|
+
result = await tool.execute(parsed.data, ctx);
|
|
265
|
+
} catch (err) {
|
|
266
|
+
return {
|
|
267
|
+
output: `Tool ${toolUse.name} threw an error: ${err}. You may retry with different parameters or try an alternative approach.`,
|
|
268
|
+
terminal: false,
|
|
269
|
+
isError: true,
|
|
270
|
+
};
|
|
271
|
+
}
|
|
263
272
|
const isError =
|
|
264
273
|
typeof result === "object" && result !== null && "is_error" in result
|
|
265
274
|
? (result as { is_error: boolean }).is_error
|