fix: hide duplicated bash permission pattern
Removes permission patterns already shown as the rendered bash command Keeps distinct patterns visible in the permission card Adds tests for the pattern filtering behavior
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
export const getVisiblePermissionPatterns = (patterns: string[], renderedCommand: string): string[] => {
|
||||
if (!renderedCommand) return patterns;
|
||||
return patterns.filter((pattern) => pattern !== renderedCommand);
|
||||
};
|
||||
Reference in New Issue
Block a user