fix: xAI 410 deprecation, Responses API migration, syntax highlighting#138
Open
doxycomp wants to merge 8 commits intosuperagent-ai:mainfrom
Open
fix: xAI 410 deprecation, Responses API migration, syntax highlighting#138doxycomp wants to merge 8 commits intosuperagent-ai:mainfrom
doxycomp wants to merge 8 commits intosuperagent-ai:mainfrom
Conversation
…ade OpenAI SDK - Remove search_parameters to fix xAI 410 deprecation (Agent Tools API) - Add chalk-based syntax highlighting for chat file contents and diffs - Upgrade OpenAI SDK to ^6.17.0 - Add docs/xai-responses-api-migration.md and README link Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Added .gemini/ and .cursor/* to ignore patterns - Excluded .cursor/context.md from being ignored
- Updated background colors for added and deleted lines in the diff renderer to use standard color names. - Removed deprecated chalk-based token rendering in favor of direct Ink color support for better compatibility with Ink's color system. - Introduced a utility function to validate Ink color names, ensuring only supported colors are used.
- Added `globals` package to devDependencies and updated its version in package-lock.json. - Updated README and migration documentation to reflect the automatic use of the xAI Responses API. - Enhanced GrokAgent and GrokClient to support stateful conversations and tool calls with the new API. - Refactored input handling to clear conversation history effectively.
- Adjusted indentation in the chat interface for improved readability. - Renamed `colorizeCode` to `colorizeCodeLine` in the diff renderer for clarity. - Introduced `colorizeCodeLine` function to render individual lines with colored tokens, enhancing inline code display.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Addresses the xAI 410 deprecation (Live Search) and migrates to the xAI Responses API. Adds syntax highlighting for code in chat and diffs.
Changes
1. xAI 410 Deprecation
410 "Live search is deprecated. Please switch to the Agent Tools API".search_parametersfrom API requests.src/grok/client.ts,src/agent/grok-agent.tsSearchParameters,SearchOptions,shouldUseSearchFor().2. xAI Responses API Migration
x.ai/api.x.ai).chat()andchatStream()useresponses.createwith correct input/output mapping.store: true,previous_response_idfor continuing chats without full history.web_searchandx_searchon every request.function_call/function_call_output.3. Syntax Highlighting
src/ui/utils/code-colorizer.tsxfor JS/TS, Python, Bash, JSON.getLanguageFromFilename()for language detection from filenames.4. Dependencies
^6.17.0for xAI compatibility.^1.17.0(1.25+ has breaking changes).globalsfor ESLint flat config.5. Other
eslint.config.jsflat config..gitignore:.gemini/,.cursor/*(with!.cursor/context.md).docs/xai-responses-api-migration.md, README section.