fix: handle multiple JSON blocks in AI response parsing#393
Merged
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom Jan 6, 2026
fix/multiple-json-blocks-parsingbreaking-brake/cc-wf-studio:fix/multiple-json-blocks-parsingCopy head branch name to clipboard
Merged
fix: handle multiple JSON blocks in AI response parsing#393breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom fix/multiple-json-blocks-parsingbreaking-brake/cc-wf-studio:fix/multiple-json-blocks-parsingCopy head branch name to clipboard
breaking-brake merged 1 commit intomainbreaking-brake/cc-wf-studio:mainfrom
fix/multiple-json-blocks-parsingbreaking-brake/cc-wf-studio:fix/multiple-json-blocks-parsingCopy head branch name to clipboard
Conversation
- Add extractAllJsonBlocks helper to extract all JSON code blocks - Prioritize blocks with 'status' field for structured responses - Fix issue where multiple JSON blocks caused parse failure 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Merged
braking-brake-semantic-release Bot
pushed a commit
that referenced
this pull request
Jan 6, 2026
## [3.12.8](v3.12.7...v3.12.8) (2026-01-06) ### Bug Fixes * handle multiple JSON blocks in AI response parsing ([#393](#393)) ([29c01bf](29c01bf)) ### Improvements * add node name constraint to AI refinement prompts ([#394](#394)) ([055d254](055d254)) * auto-focus canvas on newly added nodes ([#392](#392)) ([7c1856c](7c1856c))
|
🎉 This PR is included in version 3.12.8 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
Problem
When AI returns multiple JSON code blocks in a single response (e.g., raw workflow + structured response), the workflow is not applied to the canvas. Instead, only the explanatory text is displayed.
Current Behavior
json { workflow }+ more text +json { status: "success", ... }Expected Behavior
statusfieldSolution
Improved
parseClaudeCodeOutputfunction inclaude-code-service.tsto properly handle multiple JSON blocks.Changes
File:
src/extension/services/claude-code-service.tsAdded
extractAllJsonBlocks()helper functionImproved Strategy 3 parsing logic
statusfield (structured response format)statusfield foundImpact
Testing
npm run format && npm run lint && npm run check)npm run build)🤖 Generated with Claude Code