@@ -63,7 +63,7 @@ def create_codebase_agent(
63
63
"""
64
64
llm = LLM (model_provider = model_provider , model_name = model_name , ** kwargs )
65
65
66
- # Get all codebase tools
66
+ # Initialize default tools
67
67
tools = [
68
68
ViewFileTool (codebase ),
69
69
ListDirectoryTool (codebase ),
@@ -80,17 +80,13 @@ def create_codebase_agent(
80
80
ReflectionTool (codebase ),
81
81
SearchFilesByNameTool (codebase ),
82
82
GlobalReplacementEditTool (codebase ),
83
- # SemanticSearchTool(codebase),
84
- # =====[ Github Integration ]=====
85
- # Enable Github integration
86
- # GithubCreatePRTool(codebase),
87
- # GithubViewPRTool(codebase),
88
- # GithubCreatePRCommentTool(codebase),
89
- # GithubCreatePRReviewCommentTool(codebase),
90
83
]
91
84
92
- # Add additional tools if provided
93
85
if additional_tools :
86
+ # Get names of additional tools
87
+ additional_names = {t .get_name () for t in additional_tools }
88
+ # Keep only tools that don't have matching names in additional_tools
89
+ tools = [t for t in tools if t .get_name () not in additional_names ]
94
90
tools .extend (additional_tools )
95
91
96
92
memory = MemorySaver () if memory else None
0 commit comments