Skip to content

YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context

feat: enterprise managed AI preset support in desktop app

Louis Beaumont2d34b00ee5e0
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-enterprise-policy.ts b/apps/screenpipe-app-tauri/lib/hooks/use-enterprise-policy.ts
index 5f713dbd2..67bd5f3ed 100644
--- a/apps/screenpipe-app-tauri/lib/hooks/use-enterprise-policy.ts
+++ b/apps/screenpipe-app-tauri/lib/hooks/use-enterprise-policy.ts
@@ -7,15 +7,24 @@ import { useIsEnterpriseBuild } from "./use-is-enterprise-build";
import { commands } from "@/lib/utils/tauri";
import { fetch as tauriFetch } from "@tauri-apps/plugin-http";
+interface ManagedAiPreset {
+ provider: string;
+ url: string;
+ model: string;
+ api_key: string;
+}
+
interface EnterprisePolicy {
hiddenSections: string[];
lockedSettings: Record<string, unknown>;
+ managedAiPreset: ManagedAiPreset | null;
orgName: string;
}
const EMPTY_POLICY: EnterprisePolicy = {
hiddenSections: [],
lockedSettings: {},
+ managedAiPreset: null,
orgName: "",
};
@@ -92,6 +101,7 @@ export function useEnterprisePolicy() {
const result: EnterprisePolicy = {
hiddenSections: [...new Set(allHidden)],
lockedSettings: data.lockedSettings || {},
+ managedAiPreset: data.managedAiPreset || null,
orgName: data.orgName || "",
};
console.log(