这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@homanp
Copy link
Contributor

@homanp homanp commented Jul 23, 2025

What does this PR do?

This pull request introduces a new unified SearchTool to enhance text and file search capabilities in the GrokAgent. It also updates dependencies and improves the ChatHistory UI to display search queries. Below is a summary of the most important changes:

New SearchTool Integration:

  • Added SearchTool to GrokAgent: Integrated the new SearchTool into the GrokAgent class, including initialization and usage for handling search-related tasks. (src/agent/grok-agent.ts: [1] [2] [3] [4]
  • Updated tool usage instructions: Replaced the previous reliance on bash for searches with the new search tool, updating documentation and examples for clarity. (src/agent/grok-agent.ts: [1] [2]
  • Defined SearchTool in GROK_TOOLS: Added the SearchTool 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:

  • Added ripgrep-node dependency: Introduced ripgrep-node to support the implementation of the SearchTool. (package.json: package.jsonR37)

UI Enhancements for Search:

  • Updated ChatHistory UI: Modified the ChatHistory component to display search queries when the search tool is used, improving user feedback. (src/ui/components/chat-history.tsx: [1] [2]

Code Organization:

  • Exported SearchTool: Added SearchTool to the exports in src/tools/index.ts for proper module integration. (src/tools/index.ts: src/tools/index.tsL1-R5)

Fixes #22

Checklist

  • I tested my changes
  • I reviewed my own code

@homanp homanp self-assigned this Jul 23, 2025
@homanp homanp merged commit 5c3ba94 into main Jul 23, 2025
2 checks passed
jasonkneen pushed a commit to jasonkneen/grok-cli that referenced this pull request Jul 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Add better search using ripgrep or similar

2 participants