- 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.
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 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
- 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
- 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>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Daniel <57051444+daniel-lxs@users.noreply.github.com>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
fix(embeddings): translate error messages before sending to UI
- Import t() function from i18n module
- Wrap error messages with t() translation function in _initializeEmbedder()
- Ensures proper localization of error messages in the UI
- Falls back to original message if no translation exists
* fix: use decodeURIComponent in openFile
* feat: add error handling for decodeURIComponent and tests
- Added try-catch block around decodeURIComponent to handle invalid escape sequences
- Falls back to original path if decoding fails
- Added comprehensive unit tests for the openFile function
- Tests cover invalid URI encoding, valid encoding, and various edge cases
* fix: update test to handle dynamic workspace paths in CI
* fix: handle Windows path separators in open-file tests
---------
Co-authored-by: Vivek Soni <vivex@Viveks-MacBook-Air-2.local>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>