mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
feat(filesystem): propagate localRootPaths across desktop and web API
This commit is contained in:
parent
6721919398
commit
3ee2683391
6 changed files with 93 additions and 30 deletions
|
|
@ -4,7 +4,7 @@ export type ClientPlatform = "web" | "desktop";
|
|||
export interface AgentFilesystemSelection {
|
||||
filesystem_mode: AgentFilesystemMode;
|
||||
client_platform: ClientPlatform;
|
||||
local_filesystem_root?: string;
|
||||
local_filesystem_roots?: string[];
|
||||
}
|
||||
|
||||
const DEFAULT_SELECTION: AgentFilesystemSelection = {
|
||||
|
|
@ -24,11 +24,12 @@ export async function getAgentFilesystemSelection(): Promise<AgentFilesystemSele
|
|||
}
|
||||
try {
|
||||
const settings = await window.electronAPI.getAgentFilesystemSettings();
|
||||
if (settings.mode === "desktop_local_folder" && settings.localRootPath) {
|
||||
const firstLocalRootPath = settings.localRootPaths[0];
|
||||
if (settings.mode === "desktop_local_folder" && firstLocalRootPath) {
|
||||
return {
|
||||
filesystem_mode: "desktop_local_folder",
|
||||
client_platform: "desktop",
|
||||
local_filesystem_root: settings.localRootPath,
|
||||
local_filesystem_roots: settings.localRootPaths,
|
||||
};
|
||||
}
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue