Commit Graph

93 Commits

Author SHA1 Message Date
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
2b66f755b7 fix: remove duplicate -lnettle from CFLAGS and add mkdir -p bin before build target 2025-04-12 22:32:34 +00:00
b3921685c3 chore: add publish step after build to copy binary to release directory 2025-04-12 22:29:43 +00:00
1cbb3afd48 chore: add publish target dependency to build and replace publish script with curl download 2025-04-12 22:21:00 +00:00
844a5875fb chore: add libtinfo-dev and libgnutls-dev to Dockerfile apt dependencies 2025-04-12 22:16:03 +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
0f43cd435c docs: add Grok AI model support and run command example to readme 2025-04-08 08:26:32 +00:00
f786943906 docs: add environment setup tips and OpenAI/Grok config examples to README
The diff adds a tip about creating bash files for environment variables and symlinking them for easy access, along with new configuration sections for OpenAI (using gpt-4o-mini) and Grok (using grok-2 with strict mode disabled) API setups in the README documentation.
2025-04-08 08:22:47 +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
3974d391b2 chore: strip trailing whitespace and placeholder license section from README.md 2025-04-03 11:24:37 +00:00
997fce03b2 docs: add comprehensive project overview, features, prerequisites, and configuration examples to readme 2025-04-03 11:22:50 +00:00
bfb1e2b901 chore: remove trailing whitespace from README.md line 42 and add debug logging for curl requests and JSON parsing failures 2025-04-03 11:18:56 +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
0e8fdda063 fix: add error handling for memory allocation, database, and OpenAI failures across multiple C modules 2025-04-03 03:26:11 +00:00
a71258a566 feat: add R_BASE_URL env var support with joinpath helper for dynamic API URL construction
Replace hardcoded global API URL variables with getter functions that check the R_BASE_URL environment variable, falling back to the static defaults. Introduce a joinpath utility in utils.h to safely concatenate a base URL with a path segment, handling trailing slashes and leading path slashes. Remove conditional compilation blocks for RD and OLLAMA backends, consolidating all API URL logic into the new get_completions_api_url and get_models_api_url functions. Update all call sites in openai.h to use the new getter functions instead of direct global variable access.
2025-04-03 00:18:41 +00:00
f73f9b3c50 chore: remove placeholder progress message and add tools command with claude backend
- Remove the initial commit placeholder progress message from Makefile
- Add `!tools` command to REPL that prints available tools descriptions
- Include tools.h header and integrate tools_descriptions() function
- Switch default RD backend from DeepInfra/Llama to Anthropic/Claude models
- Update advanced_model and fast_model to claude-3-5-haiku-20241022
- Change completions_api_url to Anthropic API endpoint
- Enable verbose mode by default (is_verbose = true)
- Update README to reflect new Claude/Ollama focus and remove old download links
2025-04-02 13:37:59 +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
62142a4946 chore: delete unused script.sh shell file from repository root 2025-03-30 00:48:51 +00:00
35f2f150b5 chore: remove empty placeholder commit and delete unused inplace_url.h header 2025-03-30 00:48:35 +00:00
120fe71ecd chore: remove cgi-bin gpt scripts, malloc wrappers, and dead repl help/debug commands 2025-03-30 00:47:00 +00:00
d3bfa84254 feat: add MinGW cross-compilation target and Docker support for build environment
Add build_mingw target using x86_64-w64-mingw32-gcc cross-compiler with
dedicated MinGW flags and publish step. Introduce Dockerfile with Ubuntu
base image installing all required build dependencies (gcc, make, readline,
ncurses, curl, openssl, json-c, sqlite3, python3-dev). Add compose.yml for
convenient Docker-based development shell with mounted working directory.
Extend Makefile with docker, docker_make, docker_run, run_mingw targets and
suppress error output on publish commands for build and build_free targets.
2025-03-30 00:09:06 +00:00
f7561f291d feat: extend supported file extensions list and add cross-platform path handling in utils 2025-03-29 23:13:42 +00:00
605f396464 fix: correct typo in indexer.h header guard macro name and remove unused prompt_max_tokens 2025-03-28 22:22:57 +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
47aa1693ea chore: add rd build target and deepinfra api config with custom malloc tracking 2025-03-28 20:38:50 +00:00
7befee245d feat: add Ollama support with conditional compilation and new build targets
Introduce conditional compilation via OLLAMA preprocessor flag to switch between OpenAI and Ollama API endpoints, model names, and URLs. Add `build_free` and `run_free` Makefile targets for the Ollama variant. Enhance REPL with `!models` command to list available models, improve error handling in `openai_process_chat_message`, and fix history line addition logic.
2025-03-28 19:50:10 +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
599a268e65 refactor: replace hardcoded prompt_temperature and db_file with PROMPT_TEMPERATURE and DB_FILE macros defined in r.h 2025-03-28 05:55:22 +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
0b54f87e3a docs: add multi-language keyword support and expand code buffer in markdown parser 2025-03-28 02:10:54 +00:00
e903226953 fix: handle triple backtick code blocks in markdown-to-ansi parser and add rpylib.so to gitignore 2025-03-28 02:02:24 +00:00
3d4b57d8ae fix: comment out max_tokens field and add missing includes across multiple headers 2025-03-28 01:41:15 +00:00
8dc66bbfaa feat: add web_search function and dynamic model switching with !dump/!model/!debug commands 2025-03-28 00:55:04 +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
7cd02d81f5 fix: guard against null avatar URL in user profile loader before dereference 2025-03-22 02:16:14 +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
aa0467475d chore: clear terminal on first SIGINT before printing exit prompt in main.c
Add explicit system("clear") call and newline in handle_sigint to visually reset the terminal display before showing the double-Ctrl+C exit message, ensuring clean output regardless of prior screen state.
2025-03-21 02:27:11 +00:00
4e05fe540d feat: add glob-based file path autocompletion to readline input handler
Add file path completion support alongside existing command completion in the readline-based input system. Include <glob.h> header and implement line_file_generator function that uses glob pattern matching to suggest file paths based on partial input. Modify line_command_completion to detect file path context (non-command input after start position) and delegate to the new file generator, enabling tab-completion of filenames and directories in the shell-like interface.
2025-03-21 02:22:19 +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
075e4efc4f fix: replace message_add_tool_call with message_add_object in openai_chat function 2025-03-20 16:00:13 +00:00
eb99686ce9 feat: add message_add_object helper and integrate into openai_chat flow
Add a new `message_add_object` function in messages.h that appends a json_object to the global message list. Modify openai_chat in openai.h to call this function after processing a chat completion, ensuring the assistant's response object is stored. Also comment out the previous `message_add_tool_call` call to avoid duplicate message storage when tool calls are present, and add a missing `continue` in main.c's repl loop after the dump command to prevent fallthrough.
2025-03-20 15:38:10 +00:00
1bc92e5834 feat: add prompt and system methods to rpylib.c and remove free build from Makefile
- Added rpylib_prompt and rpylib_system functions to rpylib.c for user and system role OpenAI chat
- Removed build_free target from Makefile and added publish step for rpylib.so build
2025-03-20 03:13:26 +00:00
4fed366425 chore: refactor Makefile with CC/CFLAGS variables and reorder build targets 2025-03-20 01:57:47 +00:00
1a77a5b692 fix: add dump command to repl and remove deprecated hello function from rpylib 2025-03-20 01:36:56 +00:00