194
}
195
});
197
>
// Not yet resolved: show the option and resolve on selection
198
>
actions.push({
199
>
label: localize('allowRepoSession', 'Allow all files in this repository for this session'),
200
>
detail: localize('allowRepoSessionDetailLookup', 'Looks up the containing git repository for this path'),
201
>
select: async () => {
202
>
const gitRootUri = await findGitRoot(pathUri);
203
>
gitRootCache.set(pathUri, gitRootUri ?? null);
204
>
let folders = allowlist.get(sessionResource);
205
>
if (!folders) {
206
>
folders = new ResourceSet();
207
>
allowlist.set(sessionResource, folders);
208
>
}
209
>
// If we found the git root, allow the entire repo; otherwise fall back to just this folder
210
>
folders.add(gitRootUri ?? folderUri);
211
>
return true;
212
>
}
213
>
});
214
>
}
215
>
}
216
217
return actions;