Skip to content

Refactor tools to BaseTool classes and fix planner title emissions - #15

Closed
MegumiinUwU wants to merge 5 commits into
mainfrom
dev
Closed

Refactor tools to BaseTool classes and fix planner title emissions#15
MegumiinUwU wants to merge 5 commits into
mainfrom
dev

Conversation

@MegumiinUwU

Copy link
Copy Markdown
Collaborator

No description provided.

Hemdan47 added 3 commits June 22, 2026 04:18
…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.
@MegumiinUwU

Copy link
Copy Markdown
Collaborator Author

currently in review will merge after

Hemdan47 added 2 commits June 23, 2026 00:36
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.
@Hemdan47 Hemdan47 closed this Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants