( toolPermissionContext: ToolPermissionContext, )
| 845 | * @param toolPermissionContext |
| 846 | */ |
| 847 | export function getFileReadIgnorePatterns( |
| 848 | toolPermissionContext: ToolPermissionContext, |
| 849 | ): Map<string | null, string[]> { |
| 850 | const patternsByRoot = getPatternsByRoot( |
| 851 | toolPermissionContext, |
| 852 | 'read', |
| 853 | 'deny', |
| 854 | ) |
| 855 | const result = new Map<string | null, string[]>() |
| 856 | for (const [patternRoot, patternMap] of patternsByRoot.entries()) { |
| 857 | result.set(patternRoot, Array.from(patternMap.keys())) |
| 858 | } |
| 859 | |
| 860 | return result |
| 861 | } |
| 862 | |
| 863 | function patternWithRoot( |
| 864 | pattern: string, |
no test coverage detected