mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-21 18:55:16 +02:00
Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp
This commit is contained in:
commit
4e8c552440
142 changed files with 14603 additions and 6056 deletions
|
|
@ -12,6 +12,10 @@ export interface AgentFilesystemSelection {
|
|||
local_filesystem_mounts?: AgentFilesystemMountSelection[];
|
||||
}
|
||||
|
||||
export interface AgentFilesystemSelectionOptions {
|
||||
localFilesystemEnabled: boolean;
|
||||
}
|
||||
|
||||
const DEFAULT_SELECTION: AgentFilesystemSelection = {
|
||||
filesystem_mode: "cloud",
|
||||
client_platform: "web",
|
||||
|
|
@ -23,10 +27,15 @@ export function getClientPlatform(): ClientPlatform {
|
|||
}
|
||||
|
||||
export async function getAgentFilesystemSelection(
|
||||
searchSpaceId?: number | null
|
||||
searchSpaceId?: number | null,
|
||||
options?: AgentFilesystemSelectionOptions
|
||||
): Promise<AgentFilesystemSelection> {
|
||||
const platform = getClientPlatform();
|
||||
if (platform !== "desktop" || !window.electronAPI?.getAgentFilesystemSettings) {
|
||||
if (
|
||||
platform !== "desktop" ||
|
||||
!options?.localFilesystemEnabled ||
|
||||
!window.electronAPI?.getAgentFilesystemSettings
|
||||
) {
|
||||
return { ...DEFAULT_SELECTION, client_platform: platform };
|
||||
}
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@ const AgentFeatureFlagsSchema = z.object({
|
|||
enable_plugin_loader: z.boolean(),
|
||||
|
||||
enable_otel: z.boolean(),
|
||||
|
||||
enable_desktop_local_filesystem: z.boolean(),
|
||||
});
|
||||
|
||||
export type AgentFeatureFlags = z.infer<typeof AgentFeatureFlagsSchema>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue