- Remove redundant allowCommand/denyCommand message types from WebviewMessage
- Remove corresponding handlers from webviewMessageHandler
- Remove unused test file for allowCommand functionality
- Remove unused i18n keys for command_allowed and command_denied
- Simplify to use existing allowedCommands/deniedCommands infrastructure
- Standardized terminology from 'whitelisted/blacklisted' to 'allowed/denied' across all i18n files
- Removed unused _isExpanded and terminalShellIntegrationDisabled variables in CommandExecution.tsx
- Added comprehensive JSDoc documentation to complex algorithms in commandPatterns.ts
- Consolidated redundant command parsing logic into unified commandUtils module
- Updated all imports to use the new centralized utilities
- Maintained backward compatibility with re-exports where needed
All tests passing after refactoring.
- Replace hardcoded aria-labels in CommandExecution and CommandPatternSelector components
- Add missing translation keys for aria-labels in all locale files
- Update tests to use translation keys instead of hardcoded strings
- Fix duplicate commandExecution sections in Italian translation file
This completes the removal of the LLM command suggestions feature by:
- Removing the setting from Task.ts system prompt generation
- Removing the message handler case from webviewMessageHandler.ts
This commit simplifies the command pattern extraction implementation by:
- Removing all LLM-based command suggestion functionality
- Always using the shell-quote parser for deterministic command pattern extraction
- Eliminating the commandSuggestionsEnabled setting and related UI components
- Removing unnecessary complexity from the codebase
The shell-quote parser provides consistent and predictable results without
requiring LLM calls, making the feature more reliable and performant.
- Updated execute-command prompt to explicitly forbid suggesting full command chains
- Added clear instruction that only the first command should be suggested for chained commands
- This ensures the LLM will only suggest the initial command and let the user decide on subsequent commands
Fixed the pattern extraction logic to only extract individual commands and their subcommands, never full command chains. This prevents issues where complex piped or chained commands would be incorrectly treated as single patterns.
- Updated extractCommandPatterns to stop at command boundaries (&&, ||, |, ;)
- Added comprehensive tests for command chain scenarios
- Ensures only atomic commands are whitelisted, not entire command sequences
- Replace regex-based parsing with shell-quote library for deterministic parsing
- Handle complex shell syntax including quotes, escapes, and special characters
- Maintain backward compatibility with existing command patterns
- Add comprehensive test coverage for edge cases
- Addresses PR feedback about regex limitations and parsing reliability
The shell-quote library provides proper shell command parsing that handles:
- Single and double quotes with proper escape sequences
- Environment variable expansion
- Command operators (&&, ||, |, ;)
- Glob patterns and special characters
- Nested quotes and complex argument structures
This ensures commands are extracted exactly as they would be interpreted by a shell.
- Fixed issue where removed command patterns would reappear in the UI
- The problem was caused by workspace configuration being merged after UI state updates
- Now properly filters out removed patterns when merging workspace config
- Added comprehensive tests to verify the fix handles all edge cases
- Ensures user's removal actions are preserved across config updates
Fixes#5480
- Added English placeholder translations for all non-English locales
- This fixes the check-translations CI failure
- Translations can be properly localized in future updates
- Fixed programmatic suggestion generation when LLM suggestions are disabled
- CommandExecution component now properly generates suggestions from allowed patterns
- Added proper handling for when llmGeneratedSuggestions setting is false
- Fixed settings persistence for command allow/deny lists
- AutoApproveSettings now correctly saves patterns to globalState
- Fixed state management to properly update both local and global state
- Improved LLM prompt to generate complete suggestions for chained commands
- Updated execute-command prompt to handle && and || operators
- Ensures suggestions include full command chains, not just the first part
- Added tests to verify proper handling of complex command patterns
- Removed 'roo-code.commandWhitelist' from VS Code settings (package.json)
- Added command whitelisting to Auto Approve settings in plugin UI
- Migrated existing whitelist settings to new location on extension activation
- Updated all related components, tests, and localization files
- Maintains backward compatibility by migrating existing settings
This change improves user experience by consolidating all auto-approval
settings in one location within the plugin's settings interface.
- Added new configuration setting 'roo.disableLLMCommandSuggestions'
- Made command suggestions conditional based on the setting
- Updated system prompt to pass the setting value
- Added comprehensive tests for the new functionality
- Added localization support for the new setting
Fixes#5491
- Add comprehensive test coverage for removing command patterns
- Fix hardcoded strings with proper i18n translations
- Improve tooltips with clearer descriptions and settings link
- Update button tooltips to say 'Add to allowed list' etc
- Fix failing tests after UI changes
- Simplify and condense the suggestion guidelines
- Remove verbose list of common patterns
- Reduce from 3 examples to 2 more focused examples
- Remove redundant 'with suggestions' text from examples
- Keep instructions effective while reducing token usage
- Replace 'whitelist/whitelisting' with 'allow/allowing'
- Update description to mention both allowing and denying commands
- Change 'Whitelisting Guidelines' to 'Command Permission Guidelines'
- Maintains consistency with the codebase's inclusive terminology
- Remove instruction to include trailing spaces in suggestions
- Update all examples to not have trailing spaces
- Patterns like 'npm', 'git', 'ls' work fine without trailing spaces
- This prevents LLM from generating suggestions with unwanted spaces
- Add .trim() when parsing individual <suggest> tags
- Prevents suggestions like 'npm run ' with trailing spaces
- Ensures cleaner command patterns in the UI
- Replace native title attributes with StandardTooltip component
- Add info icon with tooltip next to 'Manage Command Permissions' header
- Remove redundant instruction text (now in tooltip)
- Follow established pattern from settings components
- Add immediate state updates via setAllowedCommands and setDeniedCommands
- Fixes issue where UI only updated after plugin reload
- Maintains backend sync while providing instant visual feedback
- Fixed mutual exclusivity logic in CommandExecution handlers
- When allowing a command, it now removes from deny list automatically
- When denying a command, it now removes from allow list automatically
- Simplified CommandPatternSelector to rely on handlers for state management
- Updated CommandPatternSelector to show both allow and deny options
- Added mutual exclusivity between allow and deny states
- Added visual indicators (green check for allow, red X for deny)
- Added translation strings for the new UI
- Integrated deny command handling in CommandExecution component
- Remove unused shared files that were causing knip failures
- Move command parsing utilities to webview-ui/src/utils
- Update imports to use local utilities instead of shared
- Define COMMAND_OUTPUT_STRING locally in commandParsing utility
- Fix hardcoded English strings by moving to translation files
- Add missing ARIA attributes for accessibility compliance
- Extract suggestion parsing logic to shared utils (src/shared/commandParsing.ts)
- Move pattern extraction logic to shared utils (src/shared/commandPatterns.ts)
- Extract CommandPatternSelector as a separate component for better modularity
- Consolidate message types to use 'allowedCommands' consistently
- Update tests to match new implementation
All linters and tests now pass successfully.
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>