( toolPermissionContext: ToolPermissionContext, )
| 835 | * @param toolPermissionContext |
| 836 | */ |
| 837 | export function getFileReadIgnorePatterns( |
| 838 | toolPermissionContext: ToolPermissionContext, |
| 839 | ): Map<string | null, string[]> { |
| 840 | const patternsByRoot = getPatternsByRoot( |
| 841 | toolPermissionContext, |
| 842 | 'read', |
| 843 | 'deny', |
| 844 | ) |
| 845 | const result = new Map<string | null, string[]>() |
| 846 | for (const [patternRoot, patternMap] of patternsByRoot.entries()) { |
| 847 | result.set(patternRoot, Array.from(patternMap.keys())) |
| 848 | } |
| 849 | |
| 850 | return result |
| 851 | } |
| 852 | |
| 853 | function patternWithRoot( |
| 854 | pattern: string, |
no test coverage detected