Merge remote-tracking branch 'upstream/dev' into feat/ui-revamp

This commit is contained in:
Anish Sarkar 2026-05-03 18:58:55 +05:30
commit 4e8c552440
142 changed files with 14603 additions and 6056 deletions

View file

@ -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 {

View file

@ -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>;