Commit graph

11 commits

Author SHA1 Message Date
silencezhoudev
82f6f69522 fix: support object-type arguments in tool call parsing
Add type check in safeParseToolCallArgs to handle cases where
toolCall.function.arguments is already an object instead of a JSON string.
This prevents parameter loss and 'argument is required' errors in tool calls.
2026-01-21 18:16:12 +08:00
Matt Cowger
e04c21f9c8 Address comments from @RomneyDa 2025-12-02 20:28:45 +00:00
Matt Cowger
a3810024c6 Add tests to match. 2025-12-02 20:15:10 +00:00
Matt Cowger
5f14a2fa66 fix: handle JSON contents of create_new_file
Handle case where JSON content was parsed into an object by the tool call parser.  If the arguments to the tool call are valid JSON (e.g. the model attempts to create a .json file) the earlier call to JSON.parse() will have deeply parsed the returned contents. If that has happened, convert back to string.

Fixes: #8972
2025-12-02 20:08:26 +00:00
chezsmithy
820822196b feat: ✨ Add range and head tools for file operations 2025-08-27 22:27:15 -07:00
Dallin Romney
1c5df69a3f
fix: grep escaped chars and empty results (#7323)
* fix: grep search escape and better truncation warnings

* fix: grep search tweaks

* fix: grep no results

* Fix: url test
2025-08-25 07:20:26 -07:00
Dallin Romney
1ee5c54151 feat: more thorough tool arg checking utils with tests 2025-07-21 15:31:52 +02:00
chezsmithy
1a59113445 fix: 🔇 The safeParseToolCallArgs function is logging excessively 2025-07-10 14:03:07 -07:00
Dallin Romney
c073a1e07c handle empty string json args 2025-06-26 10:35:24 -07:00
Dallin Romney
68ce00ec5c llm pre-fetch tests: nested dependency mocks for continue fetch 2025-06-06 17:39:28 -07:00
Dallin Romney
dcdc04f0ba JSON parsing progress 2025-06-04 15:16:41 -07:00