Commit graph

6 commits

Author SHA1 Message Date
hannesrudolph
0a25464cc3 refactor: eliminate code redundancy between extractCommandPatterns and parseCommand
- Refactored extractCommandPatterns to use the existing parseCommand function
- Ensures consistent command parsing behavior across the codebase
- Maintains security by removing subshell contents before parsing
- All existing tests continue to pass
2025-07-23 11:55:37 -06:00
hannesrudolph
f6642f6afe fix: prevent command output from appearing in permissions UI
- Fixed CommandExecution.tsx to only extract patterns from actual commands, not AI suggestions
- Enhanced extractCommandPatterns to filter out numeric patterns and common output words
- Added comprehensive test coverage for the bug scenario
- Ensures 'Manage Command Permissions' only shows actual executed commands

Fixes the issue where output like '0 total' from wc commands was incorrectly shown as a command pattern
2025-07-23 11:55:37 -06:00
hannesrudolph
ebf1b241c1 fix: improve command parsing to handle Output: separator correctly
- Fixed parseCommandAndOutput to properly handle the newline + 'Output:' separator
- Added test cases for commands with numbers at the start of output lines
- Updated existing tests to use template literals for proper newline handling
- Fixed test assertions to handle multiple code blocks when output is present

This resolves the issue where output lines starting with numbers (like 'wc -l' output)
were being incorrectly parsed as the command instead of the actual command text.
2025-07-23 11:55:37 -06:00
Roo Code
b24400b549 fix: address PR review feedback
- Refactored showSuggestions from state variable to constant SHOW_SUGGESTIONS
- Renamed breakingExps to stopPatterns for better clarity
- Added test coverage for edge cases in command parsing
- Fixed test assertion for multiline content handling
2025-07-23 11:55:37 -06:00
hannesrudolph
6fa0a528b9 fix: address PR review feedback
- Fix import error in CommandExecution.tsx (removed undefined parseCommandAndOutput)
- Add security features with detectSecurityIssues function for subshell detection
- Remove hardcoded command descriptions, use dynamic pattern instead
- Add comprehensive security tests for subshell detection
- Add integration tests for CommandExecution + CommandPatternSelector
- Fix Polish translation typo: 'z list' -> 'z listy'
- Simplify commandPatterns.ts by removing unnecessary complexity
2025-07-23 11:55:37 -06:00
hannesrudolph
6fda13643c feat: Add terminal command permissions UI to chat interface (#5480) 2025-07-23 11:55:37 -06:00