Commit graph

1607 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Matt Rubens
1a24cd60f9
Add padding to the index model options (#5706) 2025-07-14 16:35:45 -04:00
Matt Rubens
5fab8521cd
More tweaks to chatview layout (#5643) 2025-07-12 20:05:18 -04:00
Matt Rubens
14473ea1e9
Updated string for denied command (#5637) 2025-07-12 15:02:15 -04:00
Roomote Bot
2220a2d2ba
Add navigation link to history tab in HistoryPreview (#5630)
* feat: add navigation link to history tab in HistoryPreview

- Add 'View all history' link at bottom of history preview
- Include internationalization support with new translation key
- Use consistent styling with VSCode theme colors
- Navigate to history tab using switchTab message format

* feat: add viewAllHistory translation to all language files

* Tweaks and translations

* Fix test

---------

Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-07-12 13:47:13 -04:00
Daniel
5bffebde58
feat: add enable/disable toggle for code indexing (#5599) 2025-07-12 12:55:50 -04:00
Matt Rubens
cdacdfd54b
Add a command denylist (#5614)
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-07-12 12:36:04 -04:00
Hannes Rudolph
f5dfbf1fc2
feat(claude-code): add configurable max output tokens setting (#5610)
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>
2025-07-11 22:31:50 -04:00
Matt Rubens
f7b8345e19
Link to marketplace from modes and MCP tab (#5580) 2025-07-11 01:05:32 -04:00
sensei-woo
406b366f4a
Update ChatTextArea.tsx (#5586)
* Update ChatTextArea.tsx

fix issue 5583

* refactor(ui): move TTS stop button to bottom control bar

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-10 20:00:31 -04:00
Matt Rubens
76a3fdc256
Clean up MCP tool disabling (#5576) 2025-07-10 14:36:09 -04:00
Matt Rubens
6fa918c275
Improve the display of codebase search results (#5571) 2025-07-10 12:30:06 -04:00
Noritaka Kobayashi
ab55854702
chore: fix typos in comment & document (#5569) 2025-07-10 11:33:26 -04:00
Matt Rubens
a7b5cbd722
Soften the language for incompatible profiles (#5561) 2025-07-10 09:47:47 -04:00
shubhamgupta731
4771864a8c
Expand Vertex AI region config to include all available regions in GCP Vertex AI (#5557)
Co-authored-by: Shubham Gupta <shubham@porter.in>
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-10 09:27:28 -04:00
Daniel
dd00fc8a0f
feat: Replace title attributes with StandardTooltip in ChatTextArea (#5528)
feat: Replace title attributes with StandardTooltip in ChatTextArea buttons

- Added StandardTooltip wrapper for Stop TTS button
- Replaced title attributes with StandardTooltip for Enhance Prompt button
- Replaced title attributes with StandardTooltip for Send Message button
- Replaced title attributes with StandardTooltip for Add Images button

Note: The stopTts translation key needs to be added to the localization files
2025-07-09 16:24:53 -05:00
Matt Rubens
dfcba654a6
Tweak alignment of indexing dot (#5523) 2025-07-09 16:03:20 -04:00
Matt Rubens
2b7c266546
Update icons in chattextarea (#5520)
* Update icons in chattextarea

* fix: update icons in ChatTextArea and IndexingStatusBadge components

* fix: update Camera icon to Image and fix alignment

- Changed Camera icon to Image icon from lucide-react
- Fixed alignment issue by adjusting gap and removing extra margin
- Updated tests to work with new Lucide icon structure

* fix: revert alignment changes for Image icon

- Keep original alignment with gap-0.5 and mr-1 to match send and enhance buttons

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-09 15:03:04 -04:00
Matt Rubens
d040112a93
Remove feature3 from announcement (#5510) 2025-07-09 10:15:17 -04:00
Daniel
58cacc3cf0
fix: reset user response flag on new ask messages to fix auto-approval (#5508)
Co-authored-by: Matt Rubens <mrubens@users.noreply.github.com>
2025-07-09 09:54:26 -04:00
Matt Rubens
e028d68f57
Always show the code indexing dot (#5505) 2025-07-09 08:11:40 -04:00
Matt Rubens
7fe1c0f47a
feat: prepare v3.23.0 release (#5497) 2025-07-09 00:05:23 -04:00
Murilo Pires
fa60a31578
Indexing field validation (#5483)
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-08 23:15:37 -04:00
Matt Rubens
f59e837bb0
Hide message editing temporarily (#5494) 2025-07-08 23:11:39 -04:00
Daniel
09e348e21c
Move codebase indexing out of experimental (#5481) 2025-07-08 23:07:36 -04:00
Daniel
cb4652e45e
fix: remove flaky SearchableSelect clear button test (#5489)
- Removed test 'clears search value when clicking the clear button'
- Test was failing in full test suite due to timing/isolation issues
- Component functionality is verified to work correctly
- All tests now pass (540 passed, 1 skipped)
2025-07-08 20:38:15 -04:00
Will Li
15586d3846
Fixed auto question timer unmount (#5368)
* fixed bug

* expanded tests and made better mock

* code review: refactor & race conditions

* code review, some refactor and reset timer on task switch

* rename to onCancelAutoApproval
2025-07-08 20:19:22 -04:00
gongzhongqiang
8c1aec1912
Add Search/Filter Functionality to API Provider Selection in Settings (#5278)
* Enhance provider selection with search functionality

* fix: add SearchableSelect mock to SettingsView.spec.tsx

- Added SearchableSelect to the @/components/ui mock in SettingsView.spec.tsx
- This resolves test failures after the SearchableSelect component was introduced
- All 497 tests now pass successfully

* test: add comprehensive tests for SearchableSelect component

* feat: address PR feedback

* fix: internationalize SearchableSelect placeholder in test mock

- Replace hardcoded 'Select...' with i18n key 'settings:common.select'
- Ensures consistency with actual component usage
- Addresses PR review feedback

---------

Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-08 19:16:56 -04:00
Matt Rubens
83da295fb1
Fix auto-approve todo settings (#5482) 2025-07-08 18:48:59 -04:00
Murilo Pires
26c2fbbc07
fix: improve chat UI - add camera icon margin and make placeholder no… (#5477)
fix: improve chat UI - add camera icon margin and make placeholder non-selectable
2025-07-08 17:28:12 -03:00
Matt Rubens
a5324268dc
Remove unnecessary useEffect from sharebutton (#5476) 2025-07-08 16:01:39 -04:00
Matt Rubens
d116dbf0f1
Only show share modal from sharebutton (#5475) 2025-07-08 15:49:23 -04:00
Murilo Pires
150d71256f
Chat index UI enhancements (#5451)
Co-authored-by: Daniel Riccio <ricciodaniel98@gmail.com>
2025-07-08 13:19:02 -06:00