- Remove unnecessary commandPatterns.ts wrapper module
- Use extractPatternsFromCommand directly from command-parser.ts
- Simplify command/output parsing logic in CommandExecution.tsx
- Move CommandPattern interface to components that use it
- All tests passing
- Removed security warning detection from CommandExecution component and related tests.
- Simplified command parsing logic by consolidating command extraction and validation.
- Updated command pattern extraction to handle duplicate patterns gracefully.
- Enhanced command parsing to limit extracted patterns to a maximum of three levels.
- Removed unused security issue detection functions and related tests.
- Improved test coverage for command pattern extraction and validation.
Per user feedback, the command pattern selector should always be displayed when patterns are available, regardless of whether command restrictions are configured.
- Add support for all line ending types (\r\n, \r, \n)
- Handle simple variable references (, ) to prevent shell-quote from splitting them
- Handle special bash variables (0, , etc.)
- Maintain compatibility with all existing tests
- Fix linting warnings
- Created shared command-parser.ts to eliminate duplicate parsing logic
- Integrated detectSecurityIssues to display warnings in the UI
- Made command suggestions configurable (only show when restrictions are enabled)
- Added comprehensive tests for the new command parser
- Updated existing tests to handle the new behavior
- Replace custom parsing logic with shell-quote library
- Implement simplified extractPatterns and processCommand functions
- Maintain all existing test compatibility
- Remove dependency on parseCommand from command-validation
- Refactored extractCommandPatterns to use the existing parseCommand function
- Ensures consistent command parsing behavior across the codebase
- Maintains security by removing subshell contents before parsing
- All existing tests continue to pass
- Fixed CommandExecution.tsx to only extract patterns from actual commands, not AI suggestions
- Enhanced extractCommandPatterns to filter out numeric patterns and common output words
- Added comprehensive test coverage for the bug scenario
- Ensures 'Manage Command Permissions' only shows actual executed commands
Fixes the issue where output like '0 total' from wc commands was incorrectly shown as a command pattern
- Fixed parseCommandAndOutput to properly handle the newline + 'Output:' separator
- Added test cases for commands with numbers at the start of output lines
- Updated existing tests to use template literals for proper newline handling
- Fixed test assertions to handle multiple code blocks when output is present
This resolves the issue where output lines starting with numbers (like 'wc -l' output)
were being incorrectly parsed as the command instead of the actual command text.
- Replace unused showSuggestions state with SHOW_SUGGESTIONS constant
- Fix parseCommandAndOutput import name consistency
- Add test coverage for fallback case where command equals text
- Refactored showSuggestions from state variable to constant SHOW_SUGGESTIONS
- Renamed breakingExps to stopPatterns for better clarity
- Added test coverage for edge cases in command parsing
- Fixed test assertion for multiline content handling
- Addresses code review feedback about unused state variable
- showSuggestions is always true and never changes, so it doesn't need to be state
- All tests pass and no linting issues
* docs: clarify when to use update_todo_list tool
Added 'complicated' to the condition for when to use the update_todo_list tool,
making it clearer that the tool should be used for tasks that are either
complicated OR involve multiple steps.
* fix: update vscode mock and snapshots for update_todo_list tool changes
- Add missing RelativePattern export to vscode mock
- Fix onDidChangeWorkspaceFolders function in workspace mock
- Update test snapshots to reflect new "complicated" text in update_todo_list tool documentation
- Build tree-sitter WASM files to fix parsing tests
Fixes failing CI tests related to PR #5926 documentation changes.
* Delete package-lock.json
* revert: remove unrelated changes to src/__mocks__/vscode.js
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
* feat: add jump icon for newly created files
- Add jump icon to newFileCreated tool case in ChatRow.tsx
- Matches existing pattern from readFile case for consistent UX
- Allows users to quickly open newly created files
- Fixes issue #5736
* fix: remove duplicate file path display in newFileCreated case
- Removed redundant ToolUseBlock that was showing file path twice
- Added onJumpToFile prop to CodeAccordian component to support jump icon
- Jump icon now appears in CodeAccordian header for newFileCreated files
- Maintains consistent UX with existing file operations while avoiding duplication
Fixes feedback from @daniel-lxs about duplicate elements being shown
* fix: address PR feedback for jump icon on new files
- Fix openFile message to use correct path format with './' prefix
- Remove duplicate chevron icon when jump icon is present
- Add aria-label for accessibility
- Fix styling: use mr-1 to match progressStatus icon
- Remove redundant margin style from jump icon
---------
Co-authored-by: Roo Code <roo@roocode.com>
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
InvalidClientTokenError indicates an unrecoverable state for
the session, so we need to be more exact about triggering it. A recent
Clerk outage resulted in a lot of 429 responses which should really cause
inactive-session, not a full clear to logged-out.
* fix: sort symlinked rules files alphabetically
- Add alphabetical sorting to readTextFilesFromDirectory function
- Sort by basename of filename (case-insensitive) for consistent order
- Fixes issue where symlinked rules were read in random order
- Add test case to verify alphabetical sorting behavior
Fixes#4131
* chore: remove solution-indicating comment per PR feedback
* fix: sort symlinks by their symlink names, not target names
- Modified readTextFilesFromDirectory to store both original symlink path and resolved target path
- Updated resolveDirectoryEntry and resolveSymLink to track both paths
- Sort files by original path (symlink name) but read content from resolved path
- Added test to verify symlinks are sorted by their names, not their target names
- This ensures consistent alphabetical ordering when using symlinks in rules directories
---------
Co-authored-by: Roo Code <roomote@roocode.com>
When running vitest without the run parameter, it enters watch mode and waits for user input (like pressing q to quit), causing tests to hang in the terminal.
This change updates the documentation to specify using npx vitest run instead of just npx vitest to ensure tests run to completion without requiring user interaction.
Signed-off-by: Eric Wheeler <roo-code@z.ewheeler.org>
Co-authored-by: Eric Wheeler <roo-code@z.ewheeler.org>
* feat: auto-omit MCP content when no servers are configured
- Modify system prompt generation to detect when no MCP servers are defined
- Only include MCP sections when mode has mcp group AND servers exist
- Pass undefined mcpHub to capabilities and tools when no servers available
- Reduces system prompt verbosity when MCP functionality is not in use
* fix: add missing Uri and RelativePattern exports to VSCode mocks
- Added Uri and RelativePattern exports to global VSCode mock in __mocks__/vscode.js
- Fixed McpHub.spec.ts VSCode mock to include Uri and RelativePattern
- Fixed Task.spec.ts VSCode mock to include Uri and RelativePattern with proper TypeScript typing
- Resolves unhandled rejection errors in unit tests caused by missing VSCode API mocks
* fix: add proper TypeScript typing for RelativePattern in McpHub test mock
* fix: resolve unit test failures in PR #5889
- Fix VSCode mock onDidChangeWorkspaceFolders to accept callback parameter
- Update MCP test mocks to properly test auto-omit functionality
- Update test snapshots to reflect new MCP content omission behavior
- All core functionality tests now passing
* chore: remove package-lock.json as project uses npm
* fix: remove unrelated mock changes from PR
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>