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(meeting-context): collapse duplicate transcript chunks across endpoints

Louis Beaumont6fd25fb63abf
diff --git a/apps/screenpipe-app-tauri/lib/utils/meeting-context.ts b/apps/screenpipe-app-tauri/lib/utils/meeting-context.ts
index b71c54b24..7baaddc16 100644
--- a/apps/screenpipe-app-tauri/lib/utils/meeting-context.ts
+++ b/apps/screenpipe-app-tauri/lib/utils/meeting-context.ts
@@ -723,9 +723,12 @@ function mergeMeetingAudioChunks(
const out: MeetingAudioChunk[] = [];
for (const chunk of merged) {
+ // /search returns DeviceType as "Input"/"Output" (PascalCase enum), while
+ // /meetings/:id/transcript returns the raw DB column "input"/"output".
+ // Lowercase both so the same chunk pulled from both endpoints collapses.
const key = [
Math.round(timestampMs(chunk.timestamp) / 1000),
- chunk.deviceType,
+ chunk.deviceType.toLowerCase(),
chunk.speakerName,
chunk.transcription.replace(/\s+/g, " ").trim().toLowerCase(),
].join("|");