Commit Graph

10 Commits

Author SHA1 Message Date
8a13f1a59c chore: replace placeholder branding with final logo and color scheme 2025-03-03 16:06:05 +00:00
d819021fdb chore: add directory_rglob tool declaration and registration to tools.h 2025-03-03 13:51:13 +00:00
be5e2e4c05 fix: clarify directory_glob tool description to specify glob format output 2025-03-03 13:09:28 +00:00
c247e3b1bb fix: remove debug print statements from chat_json and tools_descriptions functions 2025-03-03 12:57:16 +00:00
b54efff1f3 feat: add file system tools and debug logging for prompt and tool descriptions 2025-03-03 12:51:57 +00:00
0bc2698d83 fix: return strdup instead of string literal in popen error paths in tools.h
The error return paths in tool_function_bash were returning string literals instead of heap-allocated copies via strdup, causing potential null pointer dereference when callers attempt to free the returned pointer. This fix ensures both "Popen failed!" and "Failed to allocate memory!" error messages are properly duplicated on the heap before being returned.
2025-03-03 08:52:28 +00:00
00c45e0978 fix: return error strings instead of NULL on popen and realloc failures in tool_function_bash 2025-03-03 08:48:50 +00:00
f8667d1a4b feat: add bash command execution tool with popen-based output capture
Implement a new `tool_function_bash` that executes shell commands via `popen` and captures their output into a dynamically allocated buffer. Register the corresponding `tool_description_bash` JSON schema and include it in the `tools_descriptions` array alongside the existing HTTP GET tool. Also change the history file path from `~/.calpaca_history` to `.r_history` and remove the redundant `read_history` call before adding new history entries.
2025-03-03 08:39:19 +00:00
38b233bfcf chore: remove trailing blank lines and debug printfs from openai.h and tools.h 2025-03-03 07:32:41 +00:00
e4f71ccea8 feat: add tool calling support with http_fetch function and message handling
Implement tool calling infrastructure including tools.h with http_fetch function description and execution, message_add_tool_call and message_add_tool_result helpers in messages.h, tool descriptions injection into user messages and chat_json, http header parsing utilities in http.h, curl_get function in http_curl.h, and tool call execution loop in openai_chat that recursively processes tool results.
2025-03-03 07:07:17 +00:00