add support for ripgrep search #30
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This pull request introduces a new unified
SearchTool
to enhance text and file search capabilities in theGrokAgent
. It also updates dependencies and improves theChatHistory
UI to display search queries. Below is a summary of the most important changes:New
SearchTool
Integration:SearchTool
toGrokAgent
: Integrated the newSearchTool
into theGrokAgent
class, including initialization and usage for handling search-related tasks. (src/agent/grok-agent.ts
: [1] [2] [3] [4]bash
for searches with the newsearch
tool, updating documentation and examples for clarity. (src/agent/grok-agent.ts
: [1] [2]SearchTool
inGROK_TOOLS
: Added theSearchTool
with detailed parameters and descriptions for its functionality, including options for text, file, and combined searches. (src/grok/tools.ts
: src/grok/tools.tsR99-R158)Dependency Updates:
ripgrep-node
dependency: Introducedripgrep-node
to support the implementation of theSearchTool
. (package.json
: package.jsonR37)UI Enhancements for Search:
ChatHistory
UI: Modified theChatHistory
component to display search queries when thesearch
tool is used, improving user feedback. (src/ui/components/chat-history.tsx
: [1] [2]Code Organization:
SearchTool
: AddedSearchTool
to the exports insrc/tools/index.ts
for proper module integration. (src/tools/index.ts
: src/tools/index.tsL1-R5)Fixes #22
Checklist