Refactor tools to BaseTool classes and fix planner title emissions - #15
Closed
MegumiinUwU wants to merge 5 commits into
Closed
Refactor tools to BaseTool classes and fix planner title emissions#15MegumiinUwU wants to merge 5 commits into
MegumiinUwU wants to merge 5 commits into
Conversation
…gurable working_directory Bug: These tools defaulted to os.getcwd() at call time, causing them to search the agent's repo instead of the target project when the process cwd was set to the agent directory. BashTool didn't have this issue because it already used the BaseTool class pattern with injected working_directory. Changes: - Convert glob_tool, grep_tool, list_tool from @tool functions to BaseTool subclasses - Add create_glob_tool(), create_grep_tool(), create_list_tool() factories - Store working_directory as instance attribute; use as default when path omitted - Update analyzer.py to construct tools with working_directory=project_path
Bug: The planner node emitted the title event but failed to persist it to state when branching to analyzer (Branch 1) or human interaction (Branch 2). On subsequent executions, Branch 3 would unconditionally overwrite the title field, potentially causing duplicate emissions or title changes during replans. Fix: Track when title is newly generated with a flag and conditionally include it in state updates only for that execution. This ensures the title is emitted once, persisted immediately, and never overwritten in subsequent planner calls.
Collaborator
Author
|
currently in review will merge after |
Problem:
Agent was coupled to environment variables for LLM config, preventing
per-request model selection and requiring server restart for changes.
Custom models only worked with OpenAI provider.
Solution:
- Replace env-based config with per-request LLMConfig schema
- Route all providers through LiteLLM (openai, anthropic, gemini, groq, openai_compatible)
- Add shared get_llm_from_config() helper in llm/helpers.py
- Update nodes to accept RunnableConfig and extract llm_config
- Remove langchain-{groq,google-genai,openai}, add langchain-litellm
…ring via pathspec Bug: grep/glob/list tools had inconsistent hardcoded skip directories (e.g., .pytest-cache hyphen vs .pytest_cache underscore in list). Glob had no skip logic at all, walking into .git and .pytest-tmp unnecessarily. Fix: shared _ignore.py module using pathspec.GitIgnoreSpec to honor .gitignore semantics. Only .git is hardcoded because git never lists itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.