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(cloud-pipes): tab shows the org AI preset instead of always demanding a key

Louis Beaumontd2ff27a666b4
diff --git a/apps/screenpipe-app-tauri/components/settings/cloud-pipes-tab.tsx b/apps/screenpipe-app-tauri/components/settings/cloud-pipes-tab.tsx
index 1c313b2fa..68f44f491 100644
--- a/apps/screenpipe-app-tauri/components/settings/cloud-pipes-tab.tsx
+++ b/apps/screenpipe-app-tauri/components/settings/cloud-pipes-tab.tsx
@@ -216,9 +216,20 @@ export function CloudPipesTab({ active }: { active: boolean }) {
) : (
<>
<span className="text-xs text-muted-foreground flex-1">
- {r.has_ai_key ? "AI key configured for cloud pipes" : "no AI key — pipes that call models will fail in the cloud"}
+ {r.has_ai_key
+ ? "AI key set for the runner"
+ : cloud.ai?.usable_in_cloud && cloud.ai.default_preset
+ ? `AI: org preset "${cloud.ai.default_preset.id}" (${cloud.ai.default_preset.model}) from the dashboard`
+ : cloud.ai?.default_preset
+ ? `org preset "${cloud.ai.default_preset.id}" is ${cloud.ai.default_preset.provider}, the runner needs a key for it`
+ : "no AI configured. set an org preset in the enterprise dashboard, or add a key here"}
</span>
- <Button variant="outline" size="sm" className="h-7 text-xs" onClick={() => setShowAiKeyInput(true)}>
+ <Button
+ variant={cloud.ai?.usable_in_cloud || r.has_ai_key ? "ghost" : "outline"}
+ size="sm"
+ className="h-7 text-xs"
+ onClick={() => setShowAiKeyInput(true)}
+ >
{r.has_ai_key ? "replace" : "add key"}
</Button>
{r.has_ai_key && (
diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-cloud-runner.ts b/apps/screenpipe-app-tauri/lib/hooks/use-cloud-runner.ts
index 520658a2e..582cf0a33 100644
--- a/apps/screenpipe-app-tauri/lib/hooks/use-cloud-runner.ts
+++ b/apps/screenpipe-app-tauri/lib/hooks/use-cloud-runner.ts
@@ -51,6 +51,16 @@ export interface OrgPipe {
updated_at: string;
}
+/** Which AI the runner uses. Org-managed presets from the enterprise
+ * dashboard flow to the VM automatically (same policy poll as devices);
+ * presets with their own endpoint + key are self-sufficient in the cloud,
+ * screenpipe-cloud ones still need the manual runner key. */
+export interface CloudAiSummary {
+ managed_preset_count: number;
+ default_preset: { id: string; provider: string; model: string } | null;
+ usable_in_cloud: boolean;
+}
+
interface CloudRunnerState {
loading: boolean;
/** "no_license" when this device has no enterprise license key */
@@ -59,6 +69,7 @@ interface CloudRunnerState {
orgName: string | null;
runner: CloudRunnerInfo | null;
orgPipes: OrgPipe[];
+ ai: CloudAiSummary | null;
}
export function useCloudRunner(active: boolean) {
@@ -72,6 +83,7 @@ export function useCloudRunner(active: boolean) {
orgName: null,
runner: null,
orgPipes: [],
+ ai: null,
});
const [mutating, setMutating] = useState(false);
@@ -107,6 +119,7 @@ export function useCloudRunner(active: boolean) {
orgName: data.org_name || null,
runner: data.runner || null,
orgPipes: data.org_pipes || [],
+ ai: data.ai || null,
});
} catch (e: any) {
setState((s) => ({