File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
webview-ui/src/components/chat Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -33,11 +33,13 @@ export const CommandPatternSelector: React.FC<CommandPatternSelectorProps> = ({
3333
3434 // Create a combined list with full command first, then patterns
3535 const allPatterns = useMemo ( ( ) => {
36- const fullCommandPattern : CommandPattern = { pattern : command }
36+ // Trim the command to ensure consistency with extracted patterns
37+ const trimmedCommand = command . trim ( )
38+ const fullCommandPattern : CommandPattern = { pattern : trimmedCommand }
3739
3840 // Create a set to track unique patterns we've already seen
3941 const seenPatterns = new Set < string > ( )
40- seenPatterns . add ( command ) // Add the full command first
42+ seenPatterns . add ( trimmedCommand ) // Add the trimmed full command first
4143
4244 // Filter out any patterns that are duplicates or are the same as the full command
4345 const uniquePatterns = patterns . filter ( ( p ) => {
You can’t perform that action at this time.
0 commit comments