forked from RooCodeInc/Roo-Code
-
Notifications
You must be signed in to change notification settings - Fork 0
add a button to fix mermaid syntax errors by calling the LLM #1
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
Draft
markijbema
wants to merge
63
commits into
main
Choose a base branch
from
fix-mermaid-with-ai
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
84cab09 to
e32fa57
Compare
…ates (RooCodeInc#5295) * Fixes RooCodeInc#5294: Add instruction to Architect mode to avoid time estimates - Updated Architect mode custom instructions to explicitly prohibit providing time estimates - Added clear guidance to focus on actionable plans without speculating about implementation timeframes - Updated test snapshot to reflect the new instruction - All tests passing * More tweaks to prompt --------- Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: Daniel Riccio <[email protected]>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
…c search (RooCodeInc#5027) (RooCodeInc#5041) Co-authored-by: Daniel Riccio <[email protected]>
…ooCodeInc#5312) Co-authored-by: Matt Rubens <[email protected]> Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Daniel <[email protected]>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Daniel <[email protected]>
Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Matt Rubens <[email protected]>
Co-authored-by: mrubens <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Matt Rubens <[email protected]>
…#5228) Co-authored-by: Daniel Riccio <[email protected]>
…eInc#5212) (RooCodeInc#5214) Co-authored-by: Matt Rubens <[email protected]>
* Add issue-fixer-orchestrator mode * fix: address PR review comments - Restore multi-line YAML formatting for mode-writer roleDefinition - Fix duplicate numbering in workflow XML (4. -> 5., 5. -> 6.) --------- Co-authored-by: Daniel Riccio <[email protected]>
…ck in apply_diff tool (RooCodeInc#5391) * fix(tools): Resolve intermittent hangs and lack of clear error feedback in apply_diff tool (RooCodeInc#5390) * fix: show user-friendly error message for XML parsing failures - Keep detailed XML structure instructions only for LLM via pushToolResult - Show simple error message to user via cline.say - Aligns with established error handling pattern in codebase * feat: add telemetry for XML parsing errors - Track XML parsing errors using captureDiffApplicationError - Include consecutive mistake count for better error analysis - Helps monitor and debug XML parsing issues in production --------- Co-authored-by: Example User <[email protected]> Co-authored-by: Daniel Riccio <[email protected]>
Co-authored-by: matt <[email protected]> Co-authored-by: Cursor Agent <[email protected]>
…5392) Co-authored-by: Daniel Riccio <[email protected]>
…oCodeInc#5378) * feat: add markdown support to codebase indexing (RooCodeInc#4660) * fix: implement chunking for large markdown sections and fix Qdrant deduplication issue (RooCodeInc#4660) - Modified parseMarkdownContent to chunk large sections (>1150 chars) - Added support for chunking header-less markdown files - Fixed _chunkTextByLines to handle oversized lines properly - Added defensive check for parseMarkdown returning undefined - Fixed Qdrant ID generation to use segmentHash instead of file:line - This was the root cause: chunks were being deduplicated - Each chunk now gets a unique ID even from the same line - Added comprehensive tests for all edge cases - Ensures all markdown content is properly indexed in Qdrant * fix: remove redundant supported-extensions test file As identified in PR review, the supported-extensions.spec.ts file only tests the contents of an array, which is already implicitly covered by the functional tests in parser.spec.ts. Removing this reduces maintenance overhead without sacrificing test quality. * test: address PR review feedback - Remove redundant test 'should handle large markdown documentation folders efficiently' that only verified the scanner could iterate over mocked files - Add test to verify unique point IDs are generated for each block from the same file, ensuring the segmentHash-based ID generation prevents collisions * fix: add segmentHash to vector point payload and refactor tests - Add segmentHash to payload in scanner.ts to fix vector point ID generation - Split parser.spec.ts tests into focused unit tests (mocked dependencies) - Move integration tests to new markdownIntegration.spec.ts file - Each test suite now has clear, distinct responsibilities - Fixes issue RooCodeInc#4660: vector point ID collisions for large Markdown files * refactor: move redundant tests * feat: enhance markdown processing with consistent chunking logic and segment hashing --------- Co-authored-by: Daniel Riccio <[email protected]>
…nc#5367) (RooCodeInc#5377) * fix: resolve Go duplicate references in tree-sitter queries (RooCodeInc#5367) - Replace broad statement captures with function-scoped queries - Eliminates overlapping captures that caused duplicate references - Improves search quality and indexing performance for Go projects - Add test to validate no duplicate line ranges are captured - Maintains backward compatibility with existing functionality Fixes RooCodeInc#5367 * fix: resolve Go codebase indexing with language-specific thresholds - Update Go tree-sitter queries to capture full declarations instead of just identifiers - Implement language-specific character thresholds (50 chars for Go vs 100 default) - Fix inspectGo.spec.ts test to match new query behavior - Add comprehensive test coverage for Go indexing fix This ensures Go files are properly indexed for semantic search while preventing duplicate references. All tests now pass. * fix: implement universal 50-character threshold for code indexing - Changed MIN_BLOCK_CHARS from 100 to 50 in parser.ts - Updated tests to expect single-block captures for small Go files - Removed language-specific threshold logic - Fixes Go files not being indexed due to high character threshold Fixes RooCodeInc#5367 * test: replace Go-specific test with generic MIN_BLOCK_CHARS test - Remove go-indexing-fix.spec.ts as requested in PR feedback - Add generic test in parser.spec.ts to verify 50-character threshold - Test ensures content under 50 chars is filtered, 50+ chars is indexed - Applies to all languages, not just Go * fix: update markdown tests for MIN_BLOCK_CHARS change from 100 to 50
…or (RooCodeInc#5405) * feat: Add pre-commit review and PR template to issue-fixer-orchestrator - Add user confirmation step before committing changes - Handle large diffs (>2000 lines) with summary generation - Save PR message to temp directory instead of creating PR directly - Implement exact Roo Code PR template format - Add post-commit options for flexible PR creation - Update best practices and communication guidelines - Document new commit and PR workflow patterns * removed files that were added accidently
* feat: add Issue Fixer Orchestrator mode * feat: enhance PR Reviewer mode as orchestrator with critical review capabilities - Transform PR Reviewer into an orchestrator mode that delegates analysis tasks - Add comprehensive rule files for workflow, guidelines, and patterns - Implement file-based context management system in .roo/temp/pr-*/ - Add GitHub MCP tool integration with CLI fallback strategy - Include critical review guidelines for pattern consistency and redundancy detection - Update file permissions to support temporary context files
* feat: add Issue Fixer Orchestrator mode * feat(pr-fixer-orchestrator): enhance workflow safety and user control - Add user approval checkpoint before committing changes - Implement large diff handling (>2000 lines) with automatic summarization - Replace dangerous `git add -A` with selective file staging - Enforce context preservation in shared temp directory for all delegated tasks - Add exact PR template format specification - Update best practices to reflect new safety measures BREAKING CHANGE: Workflow now requires explicit user approval before commits * removed files that were added accidently
* feat: add configurable max search results for codebase indexing (RooCodeInc#5149) - Add codebaseIndexSearchMaxResults to configuration schema with validation (10-1000) - Update Qdrant client to accept maxResults parameter in search method - Add UI slider in Experimental Settings to configure max search results - Rename constants to DEFAULT_MAX_SEARCH_RESULTS and DEFAULT_SEARCH_MIN_SCORE for clarity - Add translations for new setting across all 17 supported languages - Add comprehensive test coverage for config manager, Qdrant client, and UI components fix: settings persistence for codebase index configuration - Add new updateCodebaseIndexConfig message type to properly merge config updates - Update SettingsView to send entire codebaseIndexConfig object instead of just enabled flag - Add backend handler to merge configuration updates instead of overwriting - Add tests for the new message handler functionality This ensures the max search results setting persists correctly when saved. * fix: correct property name in updateCodebaseIndexConfig message The frontend was sending 'config' but the backend expects 'codebaseIndexConfig'. This mismatch was preventing the max search results setting from persisting. * feat: refactor codebase index constants and update search result defaults * feat(chat): add advanced settings for maximum search results configuration * refactor: remove updateCodebaseIndexConfig and integrate max search results into saveCodeIndexSettingsAtomic - Removed updateCodebaseIndexConfig message type and handler as per PR feedback - Added codebaseIndexSearchMaxResults to codeIndexSettings type in WebviewMessage.ts - Updated saveCodeIndexSettingsAtomic to save codebaseIndexSearchMaxResults - Fixed SettingsView.tsx to use codebaseIndexEnabled message instead of updateCodebaseIndexConfig * Delete webview-ui/src/components/settings/__tests__/ExperimentalSettings.spec.tsx * refactor: remove updateCodebaseIndexConfig tests to streamline codebase indexing logic * revert this --------- Co-authored-by: Daniel Riccio <[email protected]> Co-authored-by: Daniel <[email protected]>
fix: restore search score threshold slider and fix value persistence (RooCodeInc#5041) - Add codebaseIndexSearchMinScore to WebviewMessage type definition - Include codebaseIndexSearchMinScore in saveCodeIndexSettingsAtomic handler - Initialize codebaseIndexSearchMinScore in ExtensionStateContext - Fix logical OR operators to use nullish coalescing for proper 0 value handling - Ensure search threshold values persist correctly when saving settings This restores the deleted feature from PR RooCodeInc#5041 and fixes the issue where the search score threshold value was being reset upon saving.
) - Add early return in listFiles() when limit is 0 to avoid unnecessary file scanning - Update getEnvironmentDetails() to show appropriate message when workspace files context is disabled - Add test coverage for maxWorkspaceFiles=0 scenario - Clean up test files to remove unnecessary mocking complexity This optimization improves performance when users set maxWorkspaceFiles to 0, completely bypassing file system operations.
…#5240) - Update parseOpenRouterModel to always use actual max_completion_tokens from OpenRouter API - Remove artificial restriction that only reasoning budget and Anthropic models get their actual max tokens - Fall back to 20% of context window when max_completion_tokens is null - Update getModelMaxOutputTokens to use same fallback logic for consistency - Update tests to reflect new behavior - Fixes issue where reserved tokens showed ~209k instead of actual model limits (e.g. GPT-4o: 16,384)
* Add description field to create_mode instructions - Include description field in optional but recommended fields list - Add description field to YAML example with clear guidance - Description field already exists in ModeConfig schema but was missing from instructions - Provides short, human-readable description of what the mode does (1-2 sentences) * Update description field guidance to 5 words instead of 1-2 sentences - Changed description field guidance from '1-2 sentences' to '5 words' - Updated YAML example to show concise 5-word description - Addresses feedback from @mrubens in PR comment #3041823916
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
…workspace scenarios (RooCodeInc#4397) (RooCodeInc#5403) Co-authored-by: Daniel Riccio <[email protected]>
Co-authored-by: Matt Rubens <[email protected]>
…ooCodeInc#4398) (RooCodeInc#5404) * fix: add embedder validation to prevent misleading status indicators (RooCodeInc#4398) * fix: address PR feedback and fix critical issues - Fixed settings-save flow to save before validation - Fixed Error constructor usage in scanner.ts - Fixed segment identification in file-watcher.ts - Added missing translation keys for embedder validation errors * fix: add missing Ollama translation keys - Added missing ollama.title, description, and settings keys - Fixed translation check failure in CI/CD pipeline - Synchronized all 17 non-English locale files * feat: add proactive embedder validation on provider switch - Validate embedder connection when switching providers - Prevent misleading 'Indexed' status when embedder is unavailable - Show immediate error feedback for invalid configurations - Add comprehensive test coverage for validation flow This ensures users get immediate feedback when configuring embedders, preventing confusion when providers like Ollama are not accessible. * fix: improve error handling and validation in code indexing process * refactor: extract common embedder validation and error handling logic - Created shared/validation-helpers.ts with centralized error handling utilities - Refactored OpenAI, OpenAI-Compatible, and Ollama embedders to use shared helpers - Eliminated duplicate error handling code across embedders - Improved maintainability and consistency of error handling - Fixed test compatibility in manager.spec.ts - All 2721 tests passing * refactor: simplify validation helpers by removing unnecessary wrapper functions - Removed getErrorMessageForConnectionError and inlined logic into handleValidationError - Removed isRateLimitError, logRateLimitRetry, and logEmbeddingError wrapper functions - Updated openai.ts and openai-compatible.ts to inline rate limit checking and logging - Reduced code complexity while maintaining all functionality - All 311 tests continue to pass * fix: add missing invalidResponse i18n key and fix French translation - Added missing 'invalidResponse' key to all locale files - Fixed French translation: changed 'and accessible' to 'et accessible' - Ensures proper error messages are displayed when embedder returns invalid responses * fix: restore removed score settings in webviewMessageHandler - Restored codebaseIndexSearchMaxResults and codebaseIndexSearchMinScore settings that were unintentionally removed - Keep embedder validation related changes * fix: revert unintended changes to file-watcher and scanner - Reverted point ID generation back to using line numbers instead of segmentHash - Restored { cause: deleteError } parameter in scanner error handling - These changes were unrelated to the embedder validation feature --------- Co-authored-by: Daniel Riccio <[email protected]>
c69d548 to
2460283
Compare
markijbema
pushed a commit
that referenced
this pull request
Oct 23, 2025
… tools (RooCodeInc#7649) Fixes issue where isWriteProtected was incorrectly passed as the partial flag to task.ask(), causing "Current ask promise was ignored (#1)" error. Both tools now use the askApproval wrapper function which correctly handles the parameter ordering, passing undefined for progressStatus and isWriteProtected as the fourth parameter. Fixes RooCodeInc#7648 Co-authored-by: Roo Code <[email protected]>
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.
Related GitHub Issue
Closes: RooCodeInc#4636
Description
Adds a button to fix mermaid rendering using the AI (and a few deterministic repairs).
As an alternative I tried starting this repair automatically, but since the mermaid rendering is debounced and can wait on more input from the LLM/chat this became a bit unpredictable, so I stuck to only a button to repair.
Test Procedure
Clone the react repository and open this file:
facebook/react@main/packages/react-reconciler/src/ReactFiberWorkLoop.js
Prompt:
Model: gemini-flash
This typically creates a diagram which fails to render. Then use the repair button to repair and it will fix it. It might take a few tries, some complex diagrams contain a lot of errors, and mermaid only returns the first one.
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
When I searched for mermaid on the documentation site I only found releasenotes, so I don't think the functionality itself is described, so no changes needed.
Additional Notes
Upstream from Kilo Code Kilo-Org/kilocode#842, Kilo-Org/kilocode#910