feat(filesystem): add getAgentFilesystemMounts API and integrate with LocalFilesystemBrowser for improved mount management

This commit is contained in:
Anish Sarkar 2026-04-24 05:03:23 +05:30
parent ce71897286
commit a7a758f26e
6 changed files with 77 additions and 5 deletions

View file

@ -122,7 +122,7 @@ function toVirtualPath(rootPath: string, absolutePath: string): string {
return `/${rel.replace(/\\/g, "/")}`;
}
type LocalRootMount = {
export type LocalRootMount = {
mount: string;
rootPath: string;
};
@ -145,6 +145,11 @@ function buildRootMounts(rootPaths: string[]): LocalRootMount[] {
return mounts;
}
export async function getAgentFilesystemMounts(): Promise<LocalRootMount[]> {
const rootPaths = await resolveCurrentRootPaths();
return buildRootMounts(rootPaths);
}
function parseMountedVirtualPath(virtualPath: string): {
mount: string;
subPath: string;