Commit Graph

740 Commits

Author SHA1 Message Date
AI Christianson 9ef8d1157c version bump 2025-03-12 17:16:37 -04:00
AI Christianson 26b1dbe966 reasoning assistance docs 2025-03-12 17:09:27 -04:00
Andrew I. Christianson a9656552a9
Merge pull request #124 from ariel-frischer/fix-token-limiter
Fix Sonnet 3.7 Token Limiter API Errors
2025-03-12 14:59:33 -04:00
Ariel Frischer b6f0f6a577 fix(llm.py): remove unnecessary thinking_kwargs from ChatOpenAI parameters to streamline client creation 2025-03-12 11:50:32 -07:00
Ariel Frischer 77a256317a feat: add session and trajectory models to track application state and events
- Introduce a new `Session` model to store information about each program run, including command line arguments and environment details.
- Implement a `Trajectory` model to log significant events and errors during execution, enhancing debugging and monitoring capabilities.
- Update various repository classes to support session and trajectory management, allowing for better tracking of user interactions and system behavior.
- Modify existing functions to record relevant events in the trajectory, ensuring comprehensive logging of application activities.
- Enhance error handling by logging errors to the trajectory, providing insights into failures and system performance.

feat(vsc): add initial setup for VS Code extension "ra-aid" with essential files and configurations
chore(vsc): create tasks.json for managing build and watch tasks in VS Code
chore(vsc): add .vscodeignore to exclude unnecessary files from the extension package
docs(vsc): create CHANGELOG.md to document changes and updates for the extension
docs(vsc): add README.md with instructions and information about the extension
feat(vsc): include esbuild.js for building and bundling the extension
chore(vsc): add eslint.config.mjs for TypeScript linting configuration
chore(vsc): create package.json with dependencies and scripts for the extension
feat(vsc): implement extension logic in src/extension.ts with webview support
test(vsc): add initial test suite in extension.test.ts for extension functionality
chore(vsc): create tsconfig.json for TypeScript compiler options
docs(vsc): add vsc-extension-quickstart.md for guidance on extension development
2025-03-12 11:47:21 -07:00
Ariel Frischer fdd73f149c feat(agent_utils.py): add support for sonnet_35_state_modifier for Claude 3.5 models to enhance token management
chore(anthropic_message_utils.py): remove debug print statements to clean up code and improve readability
chore(anthropic_token_limiter.py): remove debug print statements and replace with logging for better monitoring
test(test_anthropic_token_limiter.py): update tests to verify correct behavior of sonnet_35_state_modifier without patching internal logic
2025-03-12 11:16:54 -07:00
AI Christianson 12d27952d5 add --show-cost flag 2025-03-12 10:21:06 -04:00
AI Christianson 826c53e01a improve prompts 2025-03-12 08:24:41 -04:00
Ariel Frischer 7cfbcb5a2e chore(anthropic_token_limiter.py): comment out max_input_tokens and related debug prints to clean up code and reduce clutter during execution 2025-03-12 00:12:39 -07:00
Ariel Frischer d15d249929 fix(test_agent_utils.py): add name parameter to mock_react calls to ensure consistency in agent creation tests 2025-03-11 23:55:43 -07:00
Ariel Frischer 8d2d273c6b refactor(tests): move token limit tests from test_agent_utils.py to test_anthropic_token_limiter.py for better organization and clarity 2025-03-11 23:53:37 -07:00
Ariel Frischer e42f281f94 chore(anthropic_message_utils.py): remove unused fix_anthropic_message_content function to clean up codebase
chore(anthropic_token_limiter.py): remove import of fix_anthropic_message_content as it is no longer needed
test: add unit tests for has_tool_use and is_tool_pair functions to ensure correct functionality
test: enhance test coverage for anthropic_trim_messages with tool use scenarios to validate message handling
2025-03-11 23:48:08 -07:00
Ariel Frischer 376d486db8 refactor(anthropic_message_utils.py): clean up whitespace and improve code readability by removing unnecessary blank lines and aligning code formatting
fix(anthropic_message_utils.py): add warning in docstring for anthropic_trim_messages function to indicate incomplete implementation and clarify behavior
fix(anthropic_message_utils.py): ensure consistent formatting in conditional statements and improve readability of logical checks
2025-03-11 23:38:31 -07:00
Ariel Frischer a3284c9d7e feat(anthropic_token_limiter.py): add dataclass import for future use and improve code readability by restructuring import statements 2025-03-11 23:37:20 -07:00
Ariel Frischer ee73c85b02 feat(anthropic_message_utils.py): add utilities for handling Anthropic-specific message formats and trimming to improve message processing
fix(agent_utils.py): remove debug print statement for max_input_tokens to clean up code
refactor(anthropic_token_limiter.py): update state_modifier to use anthropic_trim_messages for better token management and maintain message structure
2025-03-11 23:24:57 -07:00
Ariel Frischer 09ba1ee0b9 refactor(anthropic_token_limiter.py): rename messages_to_dict to message_to_dict for consistency and clarity
feat(anthropic_token_limiter.py): add convert_message_to_litellm_format function to standardize message format for litellm
fix(anthropic_token_limiter.py): update wrapped_token_counter to handle only BaseMessage objects and improve token counting logic
chore(anthropic_token_limiter.py): add debug print statements to track token counts before and after trimming messages
2025-03-11 21:26:57 -07:00
AI Christianson c8fbd942ac session model 2025-03-11 20:11:14 -04:00
Ariel Frischer 5c9a1e81d2 feat(main.py): refactor imports for better organization and readability
feat(main.py): add DEFAULT_MODEL constant to centralize model configuration
feat(main.py): enhance logging and error handling for better debugging
feat(main.py): implement state_modifier for managing token limits in agent state
feat(anthropic_token_limiter.py): create utilities for handling token limits with Anthropic models
feat(output.py): add print_messages_compact function for debugging message output
test(anthropic_token_limiter.py): add unit tests for token limit utilities and state management
2025-03-11 14:03:18 -07:00
AI Christianson 376fe18b83 activity panel 2025-03-11 14:55:43 -04:00
AI Christianson 89ee1d96ef vsc icon 2025-03-11 14:15:37 -04:00
AI Christianson 750c0d893b vscode extension 2025-03-11 13:32:46 -04:00
AI Christianson 37764c7d56 fix tests 2025-03-11 11:25:27 -04:00
AI Christianson ae9cf5021b record trajectory at all steps 2025-03-11 11:01:05 -04:00
AI Christianson 5d899d3d13 trajectory 2025-03-11 08:56:12 -04:00
AI Christianson d0985b6b84 store trajectory for tasks 2025-03-11 08:41:59 -04:00
AI Christianson 7038a61693 mock repos for test 2025-03-11 08:41:51 -04:00
AI Christianson 96093e8dfc trajectory for stage transitions 2025-03-11 08:34:08 -04:00
Andrew I. Christianson b4b0fdd686
Merge pull request #120 from ariel-frischer/cost-display
Add Cost Display for Default ReAct Agent
2025-03-10 20:12:01 -04:00
Ariel Frischer 4aa1b0ba93 refactor(agent_utils.py): remove unused run_research_agent and run_web_research_agent functions to clean up code and improve maintainability
refactor(agent_utils.py): import run_research_agent and run_web_research_agent from their respective modules to streamline the code structure and enhance clarity
2025-03-10 17:09:05 -07:00
Ariel Frischer c4b2d2bb51 fix(agent_utils.py): remove merge conflict markers and clean up imports to ensure code integrity
refactor(agent_utils.py): consolidate research agent imports for better organization and readability
2025-03-10 17:07:24 -07:00
Ariel Frischer 89e4556e7b feat: implement trajectory model and repository for tracking agent actions
This commit introduces a new `Trajectory` model to the database, which tracks the sequence of actions taken by agents, including tool executions and their results. The addition of the `TrajectoryRepository` allows for storing and retrieving these trajectories, enabling better analysis of agent behavior and debugging of issues.

Additionally, the commit refactors existing code to utilize the new repository and model, improving the overall architecture and maintainability of the codebase. This change is essential for enhancing the capabilities of the agent system and providing a more robust framework for future development.
2025-03-10 17:05:34 -07:00
Ariel Frischer 4d4eb6cadb fix(tests): add cost_cb parameter to fake_print_agent_output function to enhance flexibility in testing
style(tests): add newline at the end of test_handle_api_error_resource_exhausted function for consistency with PEP 8 guidelines
2025-03-10 17:03:42 -07:00
Ariel Frischer 8f2adc7f61 fix(output.py): update subtitle text from "Total Cost" to "Cost" for clarity in cost information display 2025-03-10 17:01:00 -07:00
Ariel Frischer f43c5e72b6 feat(output.py): add get_cost_subtitle function to generate cost subtitles for agent output
refactor(output.py): simplify subtitle generation in print_agent_output function by using get_cost_subtitle
2025-03-10 16:58:39 -07:00
Ariel Frischer 416689b030 feat(agent_utils.py): pass callback to print_agent_output to track costs and tokens
feat(output.py): enhance print_agent_output to display cost and token information in the output panel
2025-03-10 16:51:42 -07:00
AI Christianson 909825bf1b refactor: extract get_most_recent_id 2025-03-10 19:37:39 -04:00
AI Christianson b3010bb649 add error info to trajectory records 2025-03-10 19:12:14 -04:00
AI Christianson 78983ec20b add trajectory table 2025-03-10 18:59:42 -04:00
AI Christianson a18998be0d add project info to reasoning assist prompts 2025-03-10 18:01:56 -04:00
AI Christianson 3db7cc2ca9 improve prompt 2025-03-10 17:47:31 -04:00
AI Christianson b5e4c64042 improve prompts; make list_directory more resilient 2025-03-10 16:41:09 -04:00
AI Christianson 7d579f5557 improve prompts 2025-03-10 15:37:38 -04:00
AI Christianson e81421a95a improve prompts 2025-03-10 15:30:22 -04:00
AI Christianson c98c107ce3 use expert model for reasoning assisted mode 2025-03-10 14:58:47 -04:00
AI Christianson 51fa86b5c4 refactor: extract run_task_implementation_agent 2025-03-10 14:44:34 -04:00
AI Christianson d8dcc8ca86 refactor: extract run_planning_agent 2025-03-10 14:19:06 -04:00
AI Christianson a437a1e8c3 prompt improvements 2025-03-10 13:46:08 -04:00
AI Christianson 4f2c36b958 refactor: extract research agent 2025-03-10 13:33:00 -04:00
Ariel Frischer 2899b5f848
feat(agent_utils.py): add AnthropicCallbackHandler to track token usage and costs for Anthropic models (#118)
style(agent_utils.py): format imports and code for better readability
refactor(agent_utils.py): standardize model name and cost calculation logic for clarity and maintainability
chore(anthropic_callback_handler.py): create a new file for the AnthropicCallbackHandler implementation and related functions
2025-03-10 07:08:12 -04:00
Ariel Frischer ddd0e2ae2d feat(agent_utils.py): add AnthropicCallbackHandler to track token usage and costs for Anthropic models
style(agent_utils.py): format imports and code for better readability
refactor(agent_utils.py): standardize model name and cost calculation logic for clarity and maintainability
chore(anthropic_callback_handler.py): create a new file for the AnthropicCallbackHandler implementation and related functions
2025-03-10 01:18:44 -07:00