Skip to content

Conversation

kimteayon
Copy link
Collaborator

中文版模板 / Chinese template

🤔 This is a ...

  • 🆕 New feature
  • 🐞 Bug fix
  • 📝 Site / documentation improvement
  • 📽️ Demo improvement
  • 💄 Component style improvement
  • 🤖 TypeScript definition improvement
  • 📦 Bundle size optimization
  • ⚡️ Performance optimization
  • ⭐️ Feature enhancement
  • 🌐 Internationalization
  • 🛠 Refactoring
  • 🎨 Code style optimization
  • ✅ Test Case
  • 🔀 Branch merge
  • ⏩ Workflow
  • ⌨️ Accessibility improvement
  • ❓ Other (about what?)

🔗 Related Issues

  • Describe the source of related requirements, such as links to relevant issue discussions.
  • For example: close #xxxx, fix #xxxx

💡 Background and Solution

  • The specific problem to be addressed.
  • List the final API implementation and usage if needed.
  • If there are UI/interaction changes, consider providing screenshots or GIFs.

📝 Change Log

Language Changelog
🇺🇸 English
🇨🇳 Chinese 修复处理流数据服务器错误问题

Copy link
Contributor

github-actions bot commented Oct 13, 2025

Preview is ready

Copy link

Summary of Changes

Hello @kimteayon, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on improving the robustness of the x-sdk by enhancing its error handling capabilities for streaming data server responses. It introduces a new type for structured JSON outputs and modifies the request callbacks to accommodate these, ensuring more informative error reporting. Additionally, the PR updates the development environment's dependencies and refines several documentation examples to leverage Sandpack for interactive code demonstrations, improving the overall developer experience.

Highlights

  • Enhanced Error Handling for JSON Responses: The x-sdk now explicitly checks for success: false in JSON responses within jsonResponseHandler and triggers the onError callback with detailed error information, improving how streaming data server errors are reported.
  • New JSONOutPut Type Definition: A new TypeScript interface JSONOutPut has been introduced in x-stream to standardize the structure of JSON responses, including success, message, and name fields, facilitating consistent error handling.
  • Updated Callback Type Signatures: The onSuccess and onUpdate callbacks in XRequestCallbacks now support both Output and the new JSONOutPut types, providing more flexibility for handling diverse response formats.
  • Sandpack Integration and Dependency Updates: Documentation examples have been migrated from tsx to sandpack blocks with autorun enabled, and the Sandpack environment's dependencies (React, ReactDOM, Ant Design, and @ant-design/x packages) have been updated to their latest alpha versions.
  • Improved Documentation Examples: Several documentation examples (in both English and Chinese) have been refined for better presentation and functionality, including simplified imports and enhanced styling for the chat box demo.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch doc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@dosubot dosubot bot added the bug Something isn't working label Oct 13, 2025
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request fixes a bug in handling JSON error responses from the server by introducing a JSONOutPut type and updating the jsonResponseHandler to parse and propagate these errors. The documentation is also improved with interactive sandpack examples. My review focuses on improving the correctness of the error handling by ensuring proper Error objects are used, enhancing type safety in the new interface, and fixing a minor typing issue in the documentation examples.

Copy link

cloudflare-workers-and-pages bot commented Oct 13, 2025

Deploying ant-design-x with  Cloudflare Pages  Cloudflare Pages

Latest commit: 35082e6
Status: ✅  Deploy successful!
Preview URL: https://5867ee79.ant-design-x.pages.dev
Branch Preview URL: https://doc.ant-design-x.pages.dev

View logs

Copy link

codecov bot commented Oct 13, 2025

Bundle Report

Changes will increase total bundle size by 9.86kB (0.24%) ⬆️. This is within the configured threshold ✅

Detailed changes
Bundle name Size Change
x-markdown-array-push 3.94MB 9.86kB (0.25%) ⬆️

Affected Assets, Files, and Routes:

view changes for bundle: x-markdown-array-push

Assets Changed:

Asset Name Size Change Total Size Change (%)
mermaid.min.js 9.86kB 3.94MB 0.25%

Copy link
Contributor

github-actions bot commented Oct 13, 2025

size-limit report 📦

Path Size
packages/x/dist/antdx.min.js 65.56 KB
packages/x-sdk/dist/x-sdk.min.js 7.21 KB (+38 B 🔺)
packages/x-markdown/dist/x-markdown.min.js 43.48 KB
packages/x-markdown/dist/plugins/code-high-light.min.js 278.82 KB
packages/x-markdown/dist/plugins/latex.min.js 61.94 KB
packages/x-markdown/dist/plugins/mermaid.min.js 850.69 KB

Copy link

codecov bot commented Oct 13, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.62%. Comparing base (28b8fe9) to head (35082e6).
⚠️ Report is 1 commits behind head on next.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #1244   +/-   ##
=======================================
  Coverage   94.61%   94.62%           
=======================================
  Files         131      131           
  Lines        3457     3462    +5     
  Branches      964      967    +3     
=======================================
+ Hits         3271     3276    +5     
  Misses        184      184           
  Partials        2        2           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 15, 2025
@kimteayon kimteayon merged commit 202ccf8 into next Oct 15, 2025
13 checks passed
@kimteayon kimteayon deleted the doc branch October 15, 2025 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working lgtm This PR has been approved by a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants