mirror of
https://github.com/RooVetGit/Roo-Code.git
synced 2026-08-28 05:27:24 +00:00
- 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.
2.8 KiB
2.8 KiB
PR #5491 Fix Implementation Summary
Overview
Implemented a feature flag to disable LLM-based command suggestions in response to reviewer feedback about avoiding reliance on LLMs for command whitelist suggestions.
Changes Made
1. Configuration Setting Added
- File:
src/package.json - Added new setting:
roo-cline.disableLlmCommandSuggestions - Type: boolean, default: false
- Description: "Disable LLM-generated command suggestions and use only programmatic pattern generation"
2. Localization
- File:
src/package.nls.json - Added description for the new setting
3. Tool Prompt Conditional Logic
- File:
src/core/prompts/tools/execute-command.ts - Modified
getExecuteCommandDescriptionto conditionally include suggestions section - When
disableLlmCommandSuggestionsis true, the suggestions parameter is omitted from the tool description
4. Tool Implementation Update
- File:
src/core/tools/executeCommandTool.ts - Added check for
disableLlmCommandSuggestionssetting - When enabled, suggestions from LLM are ignored even if provided
5. Settings Propagation
- File:
src/core/task/Task.ts - Updated to pass the
disableLlmCommandSuggestionssetting through the system prompt generation
6. Test Coverage
-
File:
src/core/tools/__tests__/executeCommandTool.spec.ts -
Added comprehensive test suite for the new setting
-
Tests verify suggestions are ignored when setting is enabled
-
Tests verify suggestions work normally when setting is disabled or not set
-
File:
src/core/prompts/tools/__tests__/execute-command.spec.ts -
Added tests for conditional prompt generation
-
Verifies suggestions section is excluded when setting is enabled
How It Works
-
When
disableLlmCommandSuggestionsis false (default):- LLM receives instructions to provide command suggestions
- Tool processes suggestions and shows them to the user
- Existing behavior is preserved
-
When
disableLlmCommandSuggestionsis true:- LLM does not receive instructions about suggestions
- Even if LLM provides suggestions, they are ignored
- Falls back to programmatic pattern generation only
Benefits
- Addresses Reviewer Concern: Removes reliance on LLM for command suggestions when desired
- Backward Compatible: Default behavior unchanged, existing users unaffected
- User Control: Users can choose between LLM suggestions or deterministic patterns
- Token Savings: When enabled, reduces token usage by not including suggestion instructions
- Deterministic Behavior: Provides predictable command pattern generation when needed
Testing
All tests pass:
- Execute command tool tests: 23 passed
- Execute command prompt tests: 4 passed
The implementation is complete and ready for review.