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
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
fix: extract JSON from text fallback when model prepends prose
Louis Beaumontb34a4abd135b
diff --git a/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx b/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsxindex f44ade0fe..1367074f1 100644--- a/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/daily-summary.tsx@@ -445,9 +445,15 @@ export function DailySummaryCard({const fallbackData = await fallbackResp.json();let raw = fallbackData.choices?.[0]?.message?.content || "{}";raw = raw.trim();+ // Strip markdown fencesif (raw.startsWith("```")) {raw = raw.split("\n").slice(1).filter((l: string) => !l.startsWith("```")).join("\n");}+ // Extract JSON object if model prepended text like "Here is the summary:"+ const jsonMatch = raw.match(/\{[\s\S]*\}/);+ if (jsonMatch) {+ raw = jsonMatch[0];+ }parsed = JSON.parse(raw);} else {const finalData = await finalResp.json();