Skip to content

Commit 957bd60

Browse files
authored
fix: params reference (#901)
# Motivation <!-- Why is this change necessary? --> # Content <!-- Please include a summary of the change --> # Testing <!-- How was the change tested? --> # Please check the following before marking your PR as ready for review - [ ] I have added tests for my changes - [ ] I have updated the documentation or added new documentation as needed --------- Co-authored-by: rushilpatel0 <[email protected]>
1 parent 3a17f7a commit 957bd60

File tree

1 file changed

+3
-4
lines changed
  • src/codegen/extensions/langchain

1 file changed

+3
-4
lines changed

src/codegen/extensions/langchain/tools.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1094,6 +1094,7 @@ class SearchFilesByNameInput(BaseModel):
10941094
page: int = Field(default=1, description="Page number to return (1-based)")
10951095
files_per_page: int | float = Field(default=10, description="Number of files per page to return, use math.inf to return all files")
10961096

1097+
10971098
class SearchFilesByNameTool(BaseTool):
10981099
"""Tool for searching files by filename across a codebase."""
10991100

@@ -1107,11 +1108,9 @@ class SearchFilesByNameTool(BaseTool):
11071108
args_schema: ClassVar[type[BaseModel]] = SearchFilesByNameInput
11081109
codebase: Codebase = Field(exclude=True)
11091110

1110-
1111-
11121111
def __init__(self, codebase: Codebase):
11131112
super().__init__(codebase=codebase)
11141113

1115-
def _run(self, pattern: str) -> str:
1114+
def _run(self, pattern: str, page: int, files_per_page: int | float) -> str:
11161115
"""Execute the glob pattern search using fd."""
1117-
return search_files_by_name(self.codebase, pattern, page=self.page, files_per_page=self.files_per_page).render()
1116+
return search_files_by_name(self.codebase, pattern, page=page, files_per_page=files_per_page).render()

0 commit comments

Comments
 (0)