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: meeting, id speak
Louis Beaumont702f3b3f945e
diff --git a/pipes/identify-speakers/src/lib/utils.ts b/pipes/identify-speakers/src/lib/utils.tsindex 7c08df633..b694a9a10 100644--- a/pipes/identify-speakers/src/lib/utils.ts+++ b/pipes/identify-speakers/src/lib/utils.ts@@ -1,10 +1,5 @@-import { stat } from "@tauri-apps/plugin-fs";-import { platform } from "@tauri-apps/plugin-os";import { type ClassValue, clsx } from "clsx";import { twMerge } from "tailwind-merge";-import { ContentItem } from "./screenpipe";-import levenshtein from "js-levenshtein";-import { Duration } from "date-fns";export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs));@@ -49,86 +44,6 @@ export const convertHtmlToMarkdown = (html: string) => {return convertedHtml.replace(/<[^>]*>/g, "");};-export function getCliPath() {- const os = platform();- switch (os) {- case "windows":- return "%LOCALAPPDATA%\\screenpipe\\screenpipe.exe";- case "macos":- return "/Applications/screenpipe.app/Contents/MacOS/screenpipe";- case "linux":- return "/usr/local/bin/screenpipe";- default:- return "screenpipe";- }-}--// Add this pure function outside of the SearchChat component-export const removeDuplicateSelections = (- results: ContentItem[],- selectedResults: Set<number>,- similarityThreshold: number = 0.9-): Set<number> => {- const newSelectedResults = new Set<number>();- const seenContents: string[] = [];-- const getSimilarity = (str1: string, str2: string): number => {- const maxLength = Math.max(str1.length, str2.length);- const distance = levenshtein(str1, str2);- return 1 - distance / maxLength;- };-- const isDuplicate = (content: string): boolean => {- return seenContents.some(- (seenContent) =>- getSimilarity(content, seenContent) >= similarityThreshold- );- };-- Array.from(selectedResults).forEach((index) => {- const item = results[index];- if (!item || !item.type) return;-- let content = "";- if (item.type === "OCR") content = item.content.text;- else if (item.type === "Audio") content = item.content.transcription;- else if (item.type === "FTS") content = item.content.matched_text;-- if (!isDuplicate(content)) {- seenContents.push(content);- newSelectedResults.add(index);- }- });-- return newSelectedResults;-};--export function parseKeyboardShortcut(shortcut: string): string {- if (typeof window !== "undefined") {- const os = platform();-- const uniqueKeys = new Set(- shortcut- .toLowerCase()- .split("+")- .map((key) => key.trim())- );-- return Array.from(uniqueKeys)- .map((key) => {- if (key === "super") {- return os === "macos" ? "⌘" : "⊞";- }- if (key === "ctrl") return "⌃";- if (key === "alt") return os === "macos" ? "⌥" : "Alt";- if (key === "shift") return "⇧";- return key.charAt(0).toUpperCase() + key.slice(1);- })- .join(" + ");- }- return "";-}-export function stringToColor(str: string): string {let hash = 0;for (let i = 0; i < str.length; i++) {@@ -141,9 +56,3 @@ export function stringToColor(str: string): string {}return color;}--export async function getFileSize(filePath: string): Promise<number> {- const { size } = await stat(filePath);-- return size;-}diff --git a/pipes/meeting/src/lib/utils.ts b/pipes/meeting/src/lib/utils.tsindex 5fe39b53c..b694a9a10 100644--- a/pipes/meeting/src/lib/utils.ts+++ b/pipes/meeting/src/lib/utils.ts@@ -1,50 +1,18 @@-import { ContentItem } from "@screenpipe/js";-import { clsx, type ClassValue } from "clsx";+import { type ClassValue, clsx } from "clsx";import { twMerge } from "tailwind-merge";-import levenshtein from "js-levenshtein";export function cn(...inputs: ClassValue[]) {return twMerge(clsx(inputs));}--export const removeDuplicateSelections = (- results: ContentItem[],- selectedResults: Set<number>,- similarityThreshold: number = 0.9-): Set<number> => {- const newSelectedResults = new Set<number>();- const seenContents: string[] = [];-- const getSimilarity = (str1: string, str2: string): number => {- const maxLength = Math.max(str1.length, str2.length);- const distance = levenshtein(str1, str2);- return 1 - distance / maxLength;- };-- const isDuplicate = (content: string): boolean => {- return seenContents.some(- (seenContent) =>- getSimilarity(content, seenContent) >= similarityThreshold- );- };-- Array.from(selectedResults).forEach((index) => {- const item = results[index];- if (!item || !item.type) return;-- let content = "";- if (item.type === "OCR") content = item.content.text;- else if (item.type === "Audio") content = item.content.transcription;- else if (item.type === "UI") content = item.content.text;-- if (!isDuplicate(content)) {- seenContents.push(content);- newSelectedResults.add(index);- }- });-- return newSelectedResults;-};+// Add this function to your existing utils.ts file+export function stripAnsiCodes(str: string): string {+ return str.replace(/\x1B\[[0-9;]*[JKmsu]/g, "");+}+export function toCamelCase(str: string): string {+ return str.replace(/([-_][a-z])/g, (group) =>+ group.toUpperCase().replace("-", "").replace("_", "")+ );+}export function keysToCamelCase<T>(obj: any): T {if (Array.isArray(obj)) {@@ -60,3 +28,31 @@ export function keysToCamelCase<T>(obj: any): T {}return obj;}++export function encode(str: string): string {+ return encodeURIComponent(str).replace(/[!'()*]/g, (c) => {+ return "%" + c.charCodeAt(0).toString(16).toUpperCase();+ });+}+export const convertHtmlToMarkdown = (html: string) => {+ const convertedHtml = html.replace(+ /<img\s+(?:[^>]*?\s+)?src="([^"]*)"(?:\s+(?:[^>]*?\s+)?alt="([^"]*)")?\s*\/?>/g,+ (match, src, alt) => {+ return ``;+ }+ );+ return convertedHtml.replace(/<[^>]*>/g, "");+};++export function stringToColor(str: string): string {+ let hash = 0;+ for (let i = 0; i < str.length; i++) {+ hash = str.charCodeAt(i) + ((hash << 5) - hash);+ }+ let color = "#";+ for (let i = 0; i < 3; i++) {+ const value = (hash >> (i * 8)) & 0xff;+ color += ("00" + value.toString(16)).substr(-2);+ }+ return color;+}diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsxindex 8ff964abf..9bb1d00da 100644--- a/screenpipe-app-tauri/components/pipe-store.tsx+++ b/screenpipe-app-tauri/components/pipe-store.tsx@@ -139,6 +139,22 @@ const corePipes: CorePipe[] = [credits: 0,paid: false,},+ {+ id: "meeting",+ name: "meeting assistant",+ description: "organize and summarize your meetings with AI - get transcripts, action items, and key insights, 100% local or using cloud models",+ url: "https://github.com/mediar-ai/screenpipe/tree/main/pipes/meeting",+ credits: 15,+ paid: true,+ },+ {+ id: "identify-speakers",+ name: "speaker identification",+ description: "automatically identify and label different speakers in your recordings using AI voice recognition",+ url: "https://github.com/mediar-ai/screenpipe/tree/main/pipes/identify-speakers",+ credits: 10,+ paid: true,+ },];const getAuthorFromSource = (source: string): string => {diff --git a/screenpipe-app-tauri/src-tauri/capabilities/main.json b/screenpipe-app-tauri/src-tauri/capabilities/main.jsonindex b59ed6ee3..921a9721d 100644--- a/screenpipe-app-tauri/src-tauri/capabilities/main.json+++ b/screenpipe-app-tauri/src-tauri/capabilities/main.json@@ -1,7 +1,7 @@{"identifier": "migrated","description": "permissions that were migrated from v1",- "local": true,+ "local": false,"windows": ["*"],diff --git a/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json b/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.jsonindex 6eebcc5f1..7159ad6da 100644--- a/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json+++ b/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json@@ -1 +1 @@-{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["*"],"permissions":["core:event:allow-listen","core:event:default","core:app:allow-version","process:allow-restart","process:allow-exit","notification:default","core:resources:default","core:menu:default","core:tray:default","shell:default","store:default","store:allow-create-store","store:allow-get","store:allow-set","store:allow-save","store:allow-load","shell:allow-open","fs:allow-watch","fs:allow-open","fs:default","fs:allow-read-file","fs:allow-read-dir","fs:allow-read","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-read-text-file","fs:allow-create","fs:allow-mkdir","fs:allow-remove","global-shortcut:allow-is-registered","global-shortcut:allow-register","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","global-shortcut:default",{"identifier":"fs:scope","allow":[{"path":"$XDG_DATA_HOME","requireLiteralLeadingDot":false},{"path":"$XDG_DATA_HOME/**","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/*","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/*","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/**","requireLiteralLeadingDot":false},{"path":"$APPDATA/*","requireLiteralLeadingDot":false},{"path":"$APPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPCONFIG/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$HOME/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$APP/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/data/**","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/pipes/**","requireLiteralLeadingDot":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","purge","-y"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["setup"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["migrate"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["serve"],"cmd":"ollama","name":"ollama","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["run",{"validator":"\\S*"}],"cmd":"ollama","name":"ollama-run","sidecar":true}]},"cli:default","shell:default","shell:allow-spawn","dialog:default","updater:default","os:default","os:allow-arch","os:allow-hostname","os:allow-os-type","core:path:default","process:default","store:default","core:webview:allow-internal-toggle-devtools",{"identifier":"shell:allow-execute","allow":[{"args":["pipe","list","--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-list","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","download",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-download","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","enable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-enable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","disable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-disable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","update",{"validator":"\\S+"},{"validator":"\\{.*\\}"}],"cmd":"screenpipe","name":"screenpipe-pipe-update","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","delete",{"validator":"\\S+"},"--yes"],"cmd":"screenpipe","name":"screenpipe-pipe-delete","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","info",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-info","sidecar":true}]},{"identifier":"http:default","allow":[{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"http://**/*"},{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"https://**/*"}]}]}}\ No newline at end of file+{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":false,"windows":["*"],"permissions":["core:event:allow-listen","core:event:default","core:app:allow-version","process:allow-restart","process:allow-exit","notification:default","core:resources:default","core:menu:default","core:tray:default","shell:default","store:default","store:allow-create-store","store:allow-get","store:allow-set","store:allow-save","store:allow-load","shell:allow-open","fs:allow-watch","fs:allow-open","fs:default","fs:allow-read-file","fs:allow-read-dir","fs:allow-read","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-read-text-file","fs:allow-create","fs:allow-mkdir","fs:allow-remove","global-shortcut:allow-is-registered","global-shortcut:allow-register","global-shortcut:allow-unregister","global-shortcut:allow-unregister-all","global-shortcut:default",{"identifier":"fs:scope","allow":[{"path":"$XDG_DATA_HOME","requireLiteralLeadingDot":false},{"path":"$XDG_DATA_HOME/**","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/*","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/*","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/**","requireLiteralLeadingDot":false},{"path":"$APPDATA/*","requireLiteralLeadingDot":false},{"path":"$APPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPCONFIG/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$HOME/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$APP/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/data/**","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/pipes/**","requireLiteralLeadingDot":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","purge","-y"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["setup"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["migrate"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["serve"],"cmd":"ollama","name":"ollama","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["run",{"validator":"\\S*"}],"cmd":"ollama","name":"ollama-run","sidecar":true}]},"cli:default","shell:default","shell:allow-spawn","dialog:default","updater:default","os:default","os:allow-arch","os:allow-hostname","os:allow-os-type","core:path:default","process:default","store:default","core:webview:allow-internal-toggle-devtools",{"identifier":"shell:allow-execute","allow":[{"args":["pipe","list","--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-list","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","download",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-download","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","enable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-enable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","disable",{"validator":"\\S+"}],"cmd":"screenpipe","name":"screenpipe-pipe-disable","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","update",{"validator":"\\S+"},{"validator":"\\{.*\\}"}],"cmd":"screenpipe","name":"screenpipe-pipe-update","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","delete",{"validator":"\\S+"},"--yes"],"cmd":"screenpipe","name":"screenpipe-pipe-delete","sidecar":true}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","info",{"validator":"\\S+"},"--output","json"],"cmd":"screenpipe","name":"screenpipe-pipe-info","sidecar":true}]},{"identifier":"http:default","allow":[{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"http://**/*"},{"methods":["GET","POST","PUT","DELETE","PATCH","HEAD","OPTIONS"],"url":"https://**/*"}]}]}}\ No newline at end of file