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

fix: re-add startCapture/stopCapture TS bindings (overwritten by version bump)

Louis Beaumont866420b4be34
diff --git a/apps/screenpipe-app-tauri/lib/utils/tauri.ts b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
index b9ad4bee3..b97c732df 100644
--- a/apps/screenpipe-app-tauri/lib/utils/tauri.ts
+++ b/apps/screenpipe-app-tauri/lib/utils/tauri.ts
@@ -182,6 +182,28 @@ async spawnScreenpipe(overrideArgs: string[] | null) : Promise<Result<null, stri
else return { status: "error", error: e as any };
}
},
+/**
+ * Start capture session (recording). Server must already be running.
+ */
+async startCapture() : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("start_capture") };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
+/**
+ * Stop capture session. Server stays alive.
+ */
+async stopCapture() : Promise<Result<null, string>> {
+ try {
+ return { status: "ok", data: await TAURI_INVOKE("stop_capture") };
+} catch (e) {
+ if(e instanceof Error) throw e;
+ else return { status: "error", error: e as any };
+}
+},
/**
* Stop everything — capture only. Server stays alive.
* This is the command called by the tray toggle and keyboard shortcut.