forked from lobehub/lobe-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 fix: Artifact Parsing and Rendering Bug Fix for Gemini 2.0 Flash (l…
…obehub#5633) * ✨ feat: Enhance LobeArtifact processing and rehype plugin - 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 * ✨ feat: Improve LobeArtifact processing with advanced code block removal - 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 * ✨ feat: Enhance LobeArtifact code block removal tests - 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 * ✨ feat: Improve LobeArtifact code block processing regex - 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 * ✨ feat: Add artifact processing and selector tests - 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 * ✨ feat: Improve artifact code block extraction in selectors - 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 * 🔇 refactor: Remove debug console logs from processWithArtifact - 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 --------- Co-authored-by: yale <[email protected]>
- Loading branch information
Showing
6 changed files
with
624 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,3 +68,4 @@ public/swe-worker* | |
*.patch | ||
vertex-ai-key.json | ||
.pnpm-store |
This file contains 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
This file contains 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
Oops, something went wrong.