Commit Graph

39 Commits

Author SHA1 Message Date
7f799e8fa5 chore: remove AppRun, compose.yml, collect_so_files.sh and database.db; add include headers and refactor Makefile with src directory structure 2026-01-28 18:34:39 +00:00
9fe393c9e8 chore: remove unused json-c includes and web_search_news function from browse.h 2025-12-26 06:24:13 +00:00
15e6b86290 feat: replace direct openai_chat calls with agent_chat and add autonomous agent pipeline with iteration control 2025-12-18 00:08:38 +00:00
09d8a1de30 chore: normalize code style and remove trailing whitespace across multiple source files 2025-09-27 19:20:18 +00:00
ae8377b0a4 feat: add get_env_string helper and R_SYSTEM_MESSAGE env support, update init prompt with key-stemming instruction 2025-05-24 13:21:13 +00:00
956d1af1ec feat: add Python code execution tool and RAG side project with Makefile targets 2025-05-14 03:23:36 +00:00
a19800f7ae chore: normalize indentation to 2 spaces and reorder includes in browse.h, db_utils.c, main.c, and messages.h 2025-05-05 12:33:08 +00:00
0ecaab39c2 feat: conditionally add strict parameter to all tool descriptions via get_use_strict() guard 2025-05-05 12:31:35 +00:00
580e352295 chore: add recursive mkdir and parent dir creation for write_file in tools.h 2025-05-05 12:09:21 +00:00
606bc27834 feat: add AppImage build pipeline with desktop integration and dependency bundling
Implement full AppImage packaging support including AppRun entry point, .desktop launcher, icon asset, and recursive shared library collection via collect_so_files.sh. The Makefile build target now generates a portable Linux executable by assembling the directory structure, copying the binary to AppImage/usr/bin/r, running the dependency collector, and invoking appimagetool to produce a self-contained AppImage binary. Also update .gitignore to exclude the AppImage build directory and add shell scripts to the ignore list.
2025-04-08 22:00:21 +00:00
7046b3e551 feat: enforce strict mode via R_USE_STRICT env var and truncate oversized tool results and content 2025-04-08 08:17:27 +00:00
e6784bc68c fix: correct glob pattern to match nested directories in build script
The fix changes the glob pattern from a literal dot to a wildcard asterisk when the target directory is ".", enabling recursive matching of files in subdirectories during the build process.
2025-04-07 08:24:38 +00:00
682b050ed4 fix: replace dot-only target_dir with wildcard for nested directory matching in rglob
The change adds a conditional check in `tool_function_directory_rglob` that converts a target_dir of "." to "*", enabling the recursive glob to match files in nested subdirectories rather than only the current directory's immediate contents.
2025-04-07 08:24:11 +00:00
ec1e14d947 chore: append 2>&1 redirect to shell commands lacking stderr handling in tools.h 2025-04-03 03:38:30 +00:00
5e34d03629 feat: add file version history tracking with db_store_file_version on write
Introduce a new `file_version_history` table to the SQLite schema and implement the `db_store_file_version` function that reads a file's current content and inserts a version record before overwriting it. The `tool_function_write_file` now calls this backup function prior to opening the file for writing, ensuring every write operation creates a recoverable snapshot.
2025-03-30 12:34:25 +00:00
bcdd0cbb86 feat: add mkdir directory creation function to vibe tool with tool description registration 2025-03-28 22:11:55 +00:00
addf84662a feat: uncomment additionalProperties false in three tool description functions for strict schema validation 2025-03-28 22:03:34 +00:00
c740d9ce54 chore: switch default build target to run_free and update model configs 2025-03-28 22:00:17 +00:00
fec259097a chore: normalize indentation to 2 spaces and reorder includes in auth.h, browse.c, chat.h, db_utils.c, db_utils.h, http_curl.h 2025-03-28 05:56:36 +00:00
7dfd1c0b44 fix: prevent infinite recursion in web_search and add upsert logic to db_set with new db_execute function 2025-03-28 04:37:22 +00:00
3d4b57d8ae fix: comment out max_tokens field and add missing includes across multiple headers 2025-03-28 01:41:15 +00:00
9348e4ebea chore: add sqlite3 link, increase prompt tokens, expand history path, and refine tool descriptions 2025-03-27 22:08:00 +00:00
eccb17d766 chore: add sqlite3 link flag, verbose mode, and new browse/db_utils modules to build system 2025-03-22 02:15:49 +00:00
0689101e72 feat: add real-time stdout printing during terminal command execution in tools.h
The change inserts a `printf("%s", output)` call inside the `tool_function_linux_terminal` function, immediately after reallocating the output buffer and before appending new data. This enables real-time display of captured process output to the console as chunks are received, rather than only returning the final aggregated string. The modification affects the core execution loop in `tools.h` where command output is accumulated from the process stream.
2025-03-21 08:19:41 +00:00
50419881dd feat: add double-sigint exit, --free flag, model command, and index_source_directory tool
- Add SIGINT handler that exits on two Ctrl+C presses within 1 second
- Introduce --free flag to switch auth type to AUTH_TYPE_FREE via auth_free()
- Implement "model" REPL command to print current prompt model name
- Register index_source_directory tool description and function in tools.h
2025-03-21 00:15:40 +00:00
6b08d3334c fix: return empty string instead of null on glob failure in directory glob
The tool_function_directory_glob function previously returned NULL when the glob
pattern failed to match, causing a null pointer dereference in the user profile
avatar loader when it attempted to process the result. Changed the return value
to an empty string to ensure callers always receive a valid pointer.
2025-03-19 20:25:34 +00:00
6e3e899832 chore: remove FREE_VERSION conditional and add --py flag for python file inclusion 2025-03-16 21:46:09 +00:00
8b25cb93d4 chore: add static qualifiers to global variables and const-correctness to tool result parameters 2025-03-16 06:36:13 +00:00
8d1968ce97 fix: add null checks for openai responses and implement interactive terminal tool with home directory expansion 2025-03-05 22:53:35 +00:00
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