(context: WorkspaceAccessContext)
| 14 | } |
| 15 | |
| 16 | export function syncWorkspaceAccessContext(context: WorkspaceAccessContext): void { |
| 17 | approvedWorkspaceRoots.clear() |
| 18 | |
| 19 | currentWorkspaceRoot = context.currentWorkspacePath |
| 20 | ? normalizeRoot(context.currentWorkspacePath) |
| 21 | : null |
| 22 | |
| 23 | for (const workspacePath of context.approvedWorkspacePaths) { |
| 24 | approvedWorkspaceRoots.add(normalizeRoot(workspacePath)) |
| 25 | } |
| 26 | |
| 27 | if (currentWorkspaceRoot) { |
| 28 | approvedWorkspaceRoots.add(currentWorkspaceRoot) |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | export function approveWorkspacePath(workspacePath: string): void { |
| 33 | approvedWorkspaceRoots.add(normalizeRoot(workspacePath)) |
no test coverage detected