feat: unify mounted workspace graph

This commit is contained in:
lucaronin
2026-05-08 00:45:21 +02:00
parent 7bda58bbf6
commit ef3aed64e3
55 changed files with 1707 additions and 189 deletions

View File

@@ -11,7 +11,10 @@ function compareVaultContainmentPath(path: string, vaultPath: string): [string,
: [normalizedPath, normalizedVaultPath]
}
export function canWritePathToVault(path: string, vaultPath: string): boolean {
export function canWritePathToVault(path: string, vaultPath: string | readonly string[]): boolean {
if (Array.isArray(vaultPath)) {
return vaultPath.some((candidate) => canWritePathToVault(path, candidate))
}
const trimmedVaultPath = vaultPath.trim()
if (!trimmedVaultPath) return true
const [targetPath, rootPath] = compareVaultContainmentPath(path, trimmedVaultPath)