- Removed security warning detection from CommandExecution component and related tests.
- Simplified command parsing logic by consolidating command extraction and validation.
- Updated command pattern extraction to handle duplicate patterns gracefully.
- Enhanced command parsing to limit extracted patterns to a maximum of three levels.
- Removed unused security issue detection functions and related tests.
- Improved test coverage for command pattern extraction and validation.
- Created shared command-parser.ts to eliminate duplicate parsing logic
- Integrated detectSecurityIssues to display warnings in the UI
- Made command suggestions configurable (only show when restrictions are enabled)
- Added comprehensive tests for the new command parser
- Updated existing tests to handle the new behavior
- Replace custom parsing logic with shell-quote library
- Implement simplified extractPatterns and processCommand functions
- Maintain all existing test compatibility
- Remove dependency on parseCommand from command-validation
- 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
- 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
- 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.
- 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