Repository navigation
Fix AI diagram generation for fenced Mermaid responses - #1452
Open
SwastidebDas wants to merge 1 commit into
Open
SwastidebDas wants to merge 1 commit into
SwastidebDas wants to merge 1 commit into
Conversation
Signed-off-by: Swastideb Das <sdebpetrapole2001@gmail.com>
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
Fixes #1373.
AI-generated Mermaid diagrams can fail to render when the language model wraps its response in Markdown code fences, even though the generation task completes successfully.
Changes
mermaidMarkdown code fences before passing the response toparseMermaidToExcalidraw.Testing
npx vitest run tests/integration/mermaidCodeFence.spec.mjs— 4 tests passed.git diff --checkpassed.Note: The full test suite was not verified successfully because the unrelated
viewer-bundle.spec.mjstest timed out during its build step.