Commit Graph

18 Commits

Author SHA1 Message Date
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
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
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
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
1a77a5b692 fix: add dump command to repl and remove deprecated hello function from rpylib 2025-03-20 01:36:56 +00:00
0a18669f40 feat: add auth_init function and remove version-specific startup messages
Implement auth_init() in auth.h to detect API keys from environment variables (R_KEY or OPENAI_API_KEY) and set auth_type accordingly. In main.c, call auth_init() during init() and replace the conditional commercial/free version startup messages with a simple carriage return clear.
2025-03-19 21:02:39 +00:00
91553e1979 feat: replace compile-time free tier flag with runtime auth_type enum for model selection
Add AUTH_TYPE enum and global auth_type variable to auth.h, replacing the FREE_VERSION preprocessor conditional in chat.h with a dynamic get_prompt_model() function that returns "gpt-3.5-turbo" for free users and "gpt-4o-mini" for API key holders. Update all references to prompt_model to use the new function, enabling runtime model switching without recompilation.
2025-03-19 20:45:07 +00:00
6e3e899832 chore: remove FREE_VERSION conditional and add --py flag for python file inclusion 2025-03-16 21:46:09 +00:00
3aa4f0d02e chore: remove trailing whitespace from line.h and delete unused http.h module 2025-03-05 23:10:15 +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
c054c5a019 chore: remove python3.14 linking and plugin include from build and main 2025-02-13 18:09:29 +00:00
b95d7d8e56 fix: add missing newlines at EOF, fix memory leaks, increase buffer sizes, and improve plugin imports 2025-01-26 01:54:45 +00:00
45246a1bd0 feat: add --stdin flag to read prompt from piped input and increase code highlight buffer to 4096 2025-01-25 13:19:01 +00:00
7160567726 feat: add free version build target with hardcoded api key and gpt-3.5-turbo model 2025-01-05 21:59:51 +00:00
ddc3cdcff6 feat: replace hardcoded api_key with resolve_api_key() and add .rcontext.txt loading 2025-01-04 15:54:48 +00:00
c797fe2be2 chore: add MIT license headers and fix formatting across all source files 2025-01-04 07:40:31 +00:00
6c9eb2e3e3 chore: remove commented debug prints and trailing whitespace across multiple source files 2025-01-04 07:35:39 +00:00
02ee32e718 chore: scaffold project with gitignore, makefile, cgi scripts, and core c headers
Add initial project structure including .gitignore for build artifacts,
Makefile with gcc build and run targets, README placeholder, cgi-bin
directory with gpt.py and gpt_template.html, and core C headers for
chat, http, line input, markdown rendering, and messages.
2025-01-04 05:00:03 +00:00