-
-
Notifications
You must be signed in to change notification settings - Fork 11.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
๐ fix: Artifact Parsing and Rendering Bug Fix for Gemini 2.0 Flash #5633
Conversation
- Add test cases for artifact processing with adjacent lobeThinking tags - Modify utils to insert empty line between lobeThinking and lobeArtifact - Implement rehype plugin for transforming LobeArtifact tags in markdown
- Add comprehensive test cases for artifact processing with various code block scenarios - Enhance utils to handle fenced code blocks within and around lobeArtifact tags - Support removing code blocks for HTML and other artifact types
- Add comprehensive test cases for processWithArtifact function - Cover scenarios with HTML and tool_code code blocks - Test handling of code blocks with content before and after - Verify processing of artifacts with and without surrounding code blocks
- Enhance regex in processWithArtifact to handle more complex code block scenarios - Support better extraction of content before, within, and after code blocks - Improve handling of artifacts with surrounding text and multiple tags
- Enhance `processWithArtifact` with debug logging and improved code block handling - Add comprehensive test cases for artifact-related selectors in chat store - Implement tests for message content, artifact code extraction, and tag closure detection
- Add support for removing markdown code block wrapping in artifact content - Update `artifactCode` selector to handle HTML and other code block scenarios - Enhance test coverage for artifact code extraction with markdown-wrapped content
Someone is attempting to deploy a commit to the LobeHub Team on Vercel. A member of the Team first needs to authorize it. |
๐ @yaleh Thank you for raising your pull request and contributing to our Community |
- Clean up unnecessary console.log statements in artifact processing utility - Improve code readability and performance by removing debug logging - Maintain existing logic for artifact tag and code block processing
The latest updates on your projects. Learn more about Vercel for Git โ๏ธ
|
โค๏ธ Great PR @yaleh โค๏ธ The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world. |
### [Version 1.51.3](v1.51.2...v1.51.3) <sup>Released on **2025-02-05**</sup> #### โป Code Refactoring - **misc**: Refactor Wenxin with LobeOpenAICompatibleFactory. #### ๐ Bug Fixes - **misc**: Artifact Parsing and Rendering Bug Fix for Gemini 2.0 Flash. #### ๐ Styles - **misc**: Add Cache, Metadata, FeatureFlag Viewer to DevPanel. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Refactor Wenxin with LobeOpenAICompatibleFactory, closes [#5729](#5729) ([a90a75e](a90a75e)) #### What's fixed * **misc**: Artifact Parsing and Rendering Bug Fix for Gemini 2.0 Flash, closes [#5633](#5633) ([7d782b1](7d782b1)) #### Styles * **misc**: Add Cache, Metadata, FeatureFlag Viewer to DevPanel, closes [#5764](#5764) ([db4e9c7](db4e9c7)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
๐ This PR is included in version 1.51.3 ๐ The release is available on: Your semantic-release bot ๐ฆ๐ |
### [Version 1.93.2](v1.93.1...v1.93.2) <sup>Released on **2025-02-06**</sup> #### โป Code Refactoring - **misc**: Refactor Wenxin with LobeOpenAICompatibleFactory. #### ๐ Bug Fixes - **misc**: Artifact Parsing and Rendering Bug Fix for Gemini 2.0 Flash. #### ๐ Styles - **misc**: Add Cache, Metadata, FeatureFlag Viewer to DevPanel, update model list, add reasoning tag. <br/> <details> <summary><kbd>Improvements and Fixes</kbd></summary> #### Code refactoring * **misc**: Refactor Wenxin with LobeOpenAICompatibleFactory, closes [lobehub#5729](https://github.com/bentwnghk/lobe-chat/issues/5729) ([a90a75e](a90a75e)) #### What's fixed * **misc**: Artifact Parsing and Rendering Bug Fix for Gemini 2.0 Flash, closes [lobehub#5633](https://github.com/bentwnghk/lobe-chat/issues/5633) ([7d782b1](7d782b1)) #### Styles * **misc**: Add Cache, Metadata, FeatureFlag Viewer to DevPanel, closes [lobehub#5764](https://github.com/bentwnghk/lobe-chat/issues/5764) ([db4e9c7](db4e9c7)) * **misc**: Update model list, add reasoning tag, closes [lobehub#5696](https://github.com/bentwnghk/lobe-chat/issues/5696) ([dedd784](dedd784)) </details> <div align="right"> [![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top) </div>
๐ป ๅๆด็ฑปๅ | Change Type
๐ ๅๆด่ฏดๆ | Description of Change
This merge request includes several feature enhancements related to LobeArtifact processing, specifically focusing on code block extraction and removal. The changes include:
These changes collectively improve the robustness and accuracy of LobeArtifact processing, particularly in handling code blocks within the content.
๐ ่กฅๅ ไฟกๆฏ | Additional Information
This merge request enhances the processing of
LobeArtifact
tags by improving the extraction and removal of code blocks. It can now handle cases where:LobeArtifact
tags, including HTML code blocks.LobeArtifact
andLobeThinking
tags.LobeThinking
andLobeArtifact
tags.