Commit graph

5150 commits

Author SHA1 Message Date
hannesrudolph
83b6f3cc80 refactor: simplify command allow/deny implementation
- 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
2025-07-15 17:27:34 -06:00
hannesrudolph
2f321e98ce fix: address PR #5491 review feedback
- 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.
2025-07-15 17:03:57 -06:00
hannesrudolph
51d010e450 fix: add missing roo-cline.allowedCommands configuration registration 2025-07-15 16:18:08 -06:00
hannesrudolph
abb8612fc9 chore: remove test_fix_summary.md temporary file 2025-07-15 16:00:15 -06:00
hannesrudolph
06c8cb85a1 fix: replace hardcoded aria-labels with i18n translation keys
- 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
2025-07-15 15:58:06 -06:00
hannesrudolph
ded11f8e1b chore: remove temporary documentation files 2025-07-15 15:57:44 -06:00
hannesrudolph
39a8fad110 fix: Remove remaining references to disableLlmCommandSuggestions
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
2025-07-15 14:11:18 -06:00
hannesrudolph
d899a36bd4 refactor: Remove LLM suggestion feature in favor of deterministic shell-quote parser
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.
2025-07-15 14:10:18 -06:00
hannesrudolph
edba73a811 test: add comprehensive real-world test cases for command pattern parser
- Added extensive test coverage for shell-quote based command parsing
- Included edge cases: quotes, escapes, special characters, redirections
- Added real-world examples: git, npm, docker, curl, ssh commands
- Validated robustness of parser against complex shell command patterns
- Ensures reliable command execution across different shell syntaxes
2025-07-15 13:51:40 -06:00
hannesrudolph
60815f405c fix: prevent LLM from suggesting full command chains in execute-command
- 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
2025-07-15 13:42:30 -06:00
hannesrudolph
a280f876eb fix: prevent full command chains from being extracted as patterns
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
2025-07-15 13:33:18 -06:00
hannesrudolph
0a067f005a feat: implement robust command pattern extraction using shell-quote
- 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.
2025-07-15 13:24:28 -06:00
hannesrudolph
f903871394 fix: prevent removed commands from reappearing due to workspace config merging
- 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
2025-07-15 13:01:05 -06:00
hannesrudolph
0b714fdb42 fix: add missing translations for disableLlmSuggestions setting
- Added English placeholder translations for all non-English locales
- This fixes the check-translations CI failure
- Translations can be properly localized in future updates
2025-07-15 12:19:06 -06:00
hannesrudolph
238bae6aef fix: resolve command whitelisting issues
- 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
2025-07-15 12:15:46 -06:00
hannesrudolph
70ca7a6cae refactor: move command whitelisting from VS Code settings to plugin UI
- 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.
2025-07-15 11:58:20 -06:00
hannesrudolph
10843e87c0 fix: add missing imports for vscode and Package in Task.ts
- Added vscode import to fix TypeScript error
- Added Package import from shared/package module
- Fixes pre-push type checking failure
2025-07-15 09:23:47 -06:00
hannesrudolph
8bbecace55 feat: add setting to disable LLM command suggestions
- 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
2025-07-15 09:22:05 -06:00
hannesrudolph
c9964e245e chore: update all locale files with new command permission translations 2025-07-14 17:25:46 -06:00
hannesrudolph
b7986c078e fix: address PR review comments and improve command permission UI
- 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
2025-07-14 17:01:47 -06:00
hannesrudolph
e98c404ce8 refactor: streamline command permission instructions for LLM
- 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
2025-07-14 16:05:14 -06:00
hannesrudolph
4ec34ad494 fix: use inclusive terminology in command permission instructions
- 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
2025-07-14 16:02:33 -06:00
hannesrudolph
df69540d59 fix: remove trailing spaces from command suggestion examples
- 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
2025-07-14 15:59:54 -06:00
hannesrudolph
7d75a0c07e fix: trim trailing spaces from command suggestions
- Add .trim() when parsing individual <suggest> tags
- Prevents suggestions like 'npm run ' with trailing spaces
- Ensures cleaner command patterns in the UI
2025-07-14 15:57:14 -06:00
hannesrudolph
81ef373680 chore: remove temporary PR fixer file from version control
- Remove .roo/temp/pr-fixer-orchestrator/pr-5491/changes_summary.md
- This file should remain local only and not be published to the PR
2025-07-14 15:53:41 -06:00
hannesrudolph
63f4a27448 fix: remove hardcoded npm pattern suggestions
- Remove automatic addition of generic 'npm' and 'npm run' patterns
- Remove unused translation keys for hardcoded npm suggestions
- Let LLM suggestions be the sole source of command patterns
- Improves security by avoiding overly broad permission patterns
- Fix React hooks linting warning
2025-07-14 15:52:22 -06:00
hannesrudolph
38fb80fe19 refactor: improve tooltip implementation to follow codebase standards
- 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
2025-07-14 15:47:11 -06:00
hannesrudolph
9a01e805fb fix: ensure immediate UI updates when toggling command allow/deny status
- 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
2025-07-14 15:35:57 -06:00
hannesrudolph
bacf751b7b fix: correct toggle behavior for allow/deny command buttons
- 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
2025-07-14 15:28:07 -06:00
hannesrudolph
18e3cd1878 feat: add unified UI for managing allow/deny command lists
- 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
2025-07-14 15:24:11 -06:00
hannesrudolph
a0e8c24352 feat: add denyCommand handler for individual command deny listing 2025-07-14 15:13:51 -06:00
hannesrudolph
20363b4218 fix: resolve knip unused files issue
- 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
2025-07-14 15:11:27 -06:00
hannesrudolph
cf6c38092d fix: resolve all issues in PR #5491 - command whitelisting feature
- 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.
2025-07-14 15:11:27 -06:00
github-actions[bot]
88c4261829
Changeset version bump (#5708)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-07-14 16:45:39 -04:00
Matt Rubens
adb3a7bbae
chore: add changeset for v3.23.10 patch release (#5707) 2025-07-14 16:38:54 -04:00
Matt Rubens
1a24cd60f9
Add padding to the index model options (#5706) 2025-07-14 16:35:45 -04:00
Daniel
5cab585eb3
fix: prioritize built-in model dimensions over custom dimensions (#5705) 2025-07-14 16:20:34 -04:00
Matt Rubens
0c014f0028
Update CHANGELOG.md 2025-07-14 15:03:35 -04:00
github-actions[bot]
6702871c4e
Changeset version bump (#5702)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-07-14 14:52:28 -04:00
Matt Rubens
e7b90a8c5b
chore: add changeset for v3.23.9 patch release (#5701) 2025-07-14 14:44:46 -04:00
Matt Rubens
1187a7c50e
Tweaks to command timeout error (#5700) 2025-07-14 14:38:01 -04:00
github-actions[bot]
98fe2a1220
Update contributors list (#5639)
Co-authored-by: mrubens <2600+mrubens@users.noreply.github.com>
2025-07-14 14:12:59 -04:00
SannidhyaSah
824c49487b
feat: enable Claude Code provider to run natively on Windows (#5615) 2025-07-14 14:12:39 -04:00
Roomote Bot
e0196320b5
feat: Add configurable timeout for command execution (#5668)
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>
2025-07-14 14:12:12 -04:00
Daniel
d7787a2de3
feat: add gemini-embedding-001 model to code-index service (#5698)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-14 14:10:40 -04:00
Roomote Bot
f71275ef55
fix: resolve vector dimension mismatch error when switching embedding models (#5616) (#5617)
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>
2025-07-14 14:10:09 -04:00
chris-garrett
a163053430
fix: [5424] return the cwd in the exec tool's response so that the model is not lost after subsequent calls (#5667) 2025-07-13 22:36:25 -04:00
github-actions[bot]
62f97b917a
Changeset version bump (#5670)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-07-13 14:51:05 -04:00
Matt Rubens
1ca7a64170
chore: add changeset for v3.23.8 patch release (#5669) 2025-07-13 14:46:38 -04:00
Matt Rubens
e84dd0a2cf
Skip all MCP CI tests (#5645) 2025-07-12 22:23:28 -04:00