mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-05 22:02:39 +02:00
feat(filesystem): add getAgentFilesystemMounts API and integrate with LocalFilesystemBrowser for improved mount management
This commit is contained in:
parent
ce71897286
commit
a7a758f26e
6 changed files with 77 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue