add support for Grok live search #20
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 several updates to enhance the functionality of the Grok CLI, including support for real-time search capabilities, improved tool handling, and code quality improvements. The key changes are grouped below:
New Features and Enhancements:
SearchParameters
andSearchOptions
interfaces, and updating theGrokClient
to handle search parameters inchat
,chatStream
, and a newsearch
method. (src/grok/client.ts
: [1] [2] F88e776dL83R132, [3]ChatEntry
interface to include a newtool_call
type, allowing for better tracking of tool usage during interactions. (src/agent/grok-agent.ts
: src/agent/grok-agent.tsL10-R10)src/agent/grok-agent.ts
: [1] [2] [3] [4]Tool Updates:
GROK_TOOLS
definitions to use consistent formatting and added required fields for tool parameters. (src/grok/tools.ts
: src/grok/tools.tsL1-R174)UI and Interaction Improvements:
ChatHistory
component to handletool_call
entries, displaying them appropriately in the chat interface. (src/ui/components/chat-history.tsx
: [1] [2]src/hooks/use-input-handler.ts
: src/hooks/use-input-handler.tsL252-R286)Code Quality and Consistency:
src/grok/client.ts
: [1]src/grok/tools.ts
: [2]src/tools/index.ts
: [3]use-input-handler.ts
and other files. (src/hooks/use-input-handler.ts
: [1] [2] [3]Version Update:
0.0.2
to0.0.3
inpackage.json
. (package.json
: package.jsonL3-R3)Fixes #3
Checklist