(dirPath: string)
| 57 | }; |
| 58 | |
| 59 | const toggleDirectory = async (dirPath: string) => { |
| 60 | const newExpanded = new Set(expandedDirs); |
| 61 | |
| 62 | if (expandedDirs.has(dirPath)) { |
| 63 | newExpanded.delete(dirPath); |
| 64 | } else { |
| 65 | newExpanded.add(dirPath); |
| 66 | // Load directory contents if not already loaded |
| 67 | await loadDirectory(dirPath); |
| 68 | } |
| 69 | |
| 70 | setExpandedDirs(newExpanded); |
| 71 | }; |
| 72 | |
| 73 | const selectFile = async (filePath: string) => { |
| 74 | setSelectedFile(filePath); |
no test coverage detected