* Reset sandbox state and clear memoized values
()
| 806 | * Reset sandbox state and clear memoized values |
| 807 | */ |
| 808 | async function reset(): Promise<void> { |
| 809 | // Clean up settings subscription |
| 810 | settingsSubscriptionCleanup?.() |
| 811 | settingsSubscriptionCleanup = undefined |
| 812 | worktreeMainRepoPath = undefined |
| 813 | bareGitRepoScrubPaths.length = 0 |
| 814 | |
| 815 | // Clear memoized caches |
| 816 | checkDependencies.cache.clear?.() |
| 817 | isSupportedPlatform.cache.clear?.() |
| 818 | initializationPromise = undefined |
| 819 | |
| 820 | // Reset the base sandbox manager |
| 821 | return BaseSandboxManager.reset() |
| 822 | } |
| 823 | |
| 824 | /** |
| 825 | * Add a command to the excluded commands list (commands that should not be sandboxed) |