Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion bugbug/tools/code_review/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,17 @@
from bugbug.tools.code_review.database import ReviewCommentsDB
from bugbug.tools.code_review.langchain_tools import (
CodeReviewContext,
calls_between,
calls_from,
calls_to,
check_can_gc,
create_find_function_definition_tool,
expand_context,
find_definition,
get_blame,
get_field_layout,
search_identifier,
search_text,
)
from bugbug.tools.code_review.prompts import (
CODE_REVIEW_TODO_PROMPT,
Expand Down Expand Up @@ -94,7 +103,18 @@ def __init__(
self.patch_summarizer = patch_summarizer
self.suggestion_filterer = suggestion_filterer

tools = [expand_context]
tools = [
expand_context,
search_text,
get_blame,
get_field_layout,
find_definition,
search_identifier,
calls_from,
calls_to,
calls_between,
check_can_gc,
]
Comment on lines +106 to +117
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be preferable to have this as a list somewhere and then use it here and import it above, so we don't have to remember when we add a new searchfox tool that we also need to add it here

if function_search:
tools.append(create_find_function_definition_tool(function_search))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't need this anymore, do we?


Expand Down
Loading