You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# 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
Copy file name to clipboardExpand all lines: src/codegen/extensions/langchain/tools.py
+5-6
Original file line number
Diff line number
Diff line change
@@ -126,8 +126,7 @@ class SearchInput(BaseModel):
126
126
127
127
query: str=Field(
128
128
...,
129
-
description="""The search query to find in the codebase. When ripgrep is available, this will be passed as a ripgrep pattern. For regex searches, set use_regex=True.
130
-
Ripgrep is the preferred method.""",
129
+
description="""ripgrep query (or regex pattern) to run. For regex searches, set use_regex=True. Ripgrep is the preferred method.""",
131
130
)
132
131
file_extensions: list[str] |None=Field(default=None, description="Optional list of file extensions to search (e.g. ['.py', '.ts'])")
133
132
page: int=Field(default=1, description="Page number to return (1-based, default: 1)")
@@ -136,11 +135,11 @@ class SearchInput(BaseModel):
136
135
tool_call_id: Annotated[str, InjectedToolCallId]
137
136
138
137
139
-
classSearchTool(BaseTool):
140
-
"""Tool for searching the codebase."""
138
+
classRipGrepTool(BaseTool):
139
+
"""Tool for searching the codebase via RipGrep."""
141
140
142
141
name: ClassVar[str] ="search"
143
-
description: ClassVar[str] ="Search the codebase using text search or regex pattern matching"
142
+
description: ClassVar[str] ="Search the codebase using `ripgrep` or regex pattern matching"
0 commit comments