mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-19 18:45:15 +02:00
Merge upstream/dev
This commit is contained in:
commit
2d962f6dd2
107 changed files with 15033 additions and 2277 deletions
|
|
@ -22,15 +22,17 @@ export function getClientPlatform(): ClientPlatform {
|
|||
return window.electronAPI ? "desktop" : "web";
|
||||
}
|
||||
|
||||
export async function getAgentFilesystemSelection(): Promise<AgentFilesystemSelection> {
|
||||
export async function getAgentFilesystemSelection(
|
||||
searchSpaceId?: number | null
|
||||
): Promise<AgentFilesystemSelection> {
|
||||
const platform = getClientPlatform();
|
||||
if (platform !== "desktop" || !window.electronAPI?.getAgentFilesystemSettings) {
|
||||
return { ...DEFAULT_SELECTION, client_platform: platform };
|
||||
}
|
||||
try {
|
||||
const settings = await window.electronAPI.getAgentFilesystemSettings();
|
||||
const settings = await window.electronAPI.getAgentFilesystemSettings(searchSpaceId);
|
||||
if (settings.mode === "desktop_local_folder") {
|
||||
const mounts = await window.electronAPI.getAgentFilesystemMounts?.();
|
||||
const mounts = await window.electronAPI.getAgentFilesystemMounts?.(searchSpaceId);
|
||||
const localFilesystemMounts =
|
||||
mounts?.map((entry) => ({
|
||||
mount_id: entry.mount,
|
||||
|
|
|
|||
|
|
@ -427,6 +427,19 @@ class ConnectorsApiService {
|
|||
body: { tool_name: toolName },
|
||||
});
|
||||
};
|
||||
|
||||
/** Live stats for the Obsidian connector tile. */
|
||||
getObsidianStats = async (vaultId: string): Promise<ObsidianStats> => {
|
||||
return baseApiService.get<ObsidianStats>(
|
||||
`/api/v1/obsidian/stats?vault_id=${encodeURIComponent(vaultId)}`
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
export interface ObsidianStats {
|
||||
vault_id: string;
|
||||
files_synced: number;
|
||||
last_sync_at: string | null;
|
||||
}
|
||||
|
||||
export type { SlackChannel, DiscordChannel };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue