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
feat: pipe timeout dropdown in config UI, bump default to 10min
Louis Beaumont691b7dce3791
diff --git a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsxindex 79889aa51..3b1ce4326 100644--- a/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/pipes-section.tsx@@ -2011,6 +2011,54 @@ export function PipesSection() {})()}</div>+ {/* Timeout */}+ <div>+ <Label className="text-xs mb-2 block cursor-help" title="max execution time before the pipe is killed — increase for slow LLMs or complex pipes">timeout</Label>+ <Select+ value={String(pipe.config.timeout || 600)}+ onValueChange={(value) => {+ const pipeName = pipe.config.name;+ const timeout = Number(value);+ setPipes((prev) =>+ prev.map((p) =>+ p.config.name === pipeName+ ? { ...p, config: { ...p.config, timeout } }+ : p+ )+ );+ const savePromise = fetch(`${apiBase}/pipes/${pipeName}/config`, {+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ timeout }),+ }).then(() => {+ delete pendingConfigSaves.current[pipeName];+ fetchPipes();+ }).catch(() => {+ delete pendingConfigSaves.current[pipeName];+ });+ pendingConfigSaves.current[pipeName] = savePromise;+ }}+ >+ <SelectTrigger className="mt-1 h-8 text-xs">+ <SelectValue />+ </SelectTrigger>+ <SelectContent>+ {[+ { value: "120", label: "2 minutes" },+ { value: "300", label: "5 minutes" },+ { value: "600", label: "10 minutes" },+ { value: "900", label: "15 minutes" },+ { value: "1800", label: "30 minutes" },+ { value: "3600", label: "1 hour" },+ ].map((opt) => (+ <SelectItem key={opt.value} value={opt.value}>+ {opt.label}+ </SelectItem>+ ))}+ </SelectContent>+ </Select>+ </div>+{/* Connections */}<div><Label className="text-xs mb-2 block cursor-help" title="give the agent access to your apps (Slack, Obsidian, CRM, etc.) — credentials are fetched at runtime">connections</Label>diff --git a/apps/screenpipe-app-tauri/components/settings/speakers-section.tsx b/apps/screenpipe-app-tauri/components/settings/speakers-section.tsxindex 83fe47906..88b9de42e 100644--- a/apps/screenpipe-app-tauri/components/settings/speakers-section.tsx+++ b/apps/screenpipe-app-tauri/components/settings/speakers-section.tsx@@ -28,6 +28,9 @@ import {Sparkles,GitMerge,Volume2,+ Clock,+ Users,+ AlertCircle,} from "lucide-react";import { useQueryState } from "nuqs";import { emit } from "@tauri-apps/api/event";@@ -51,9 +54,9 @@ interface SimilarSpeaker {metadata: string;}-interface MergeSuggestion {- speaker: Speaker & { isNamed: boolean };- similar: SimilarSpeaker;+interface SpeakerCluster {+ members: Speaker[];+ representativeSample: AudioSample | null;}function parseSamples(metadata: string): AudioSample[] {@@ -65,9 +68,37 @@ function parseSamples(metadata: string): AudioSample[] {}}-function AudioClip({ path, startTime, duration }: { path: string; startTime: number; duration: number }) {+function formatTimeAgo(timestamp: number): string {+ const now = Date.now() / 1000;+ const diff = now - timestamp;+ if (diff < 60) return "just now";+ if (diff < 3600) return `${Math.floor(diff / 60)}m ago`;+ if (diff < 86400) return `${Math.floor(diff / 3600)}h ago`;+ if (diff < 604800) return `${Math.floor(diff / 86400)}d ago`;+ return new Date(timestamp * 1000).toLocaleDateString();+}++function getLatestSampleTime(speaker: Speaker): number {+ const samples = parseSamples(speaker.metadata);+ if (samples.length === 0) return 0;+ return Math.max(...samples.map((s) => s.end_time));+}++function AudioClip({+ path,+ startTime,+ duration,+ large,+}: {+ path: string;+ startTime: number;+ duration: number;+ large?: boolean;+}) {const audioRef = useRef<HTMLAudioElement>(null);const [playing, setPlaying] = useState(false);+ const [progress, setProgress] = useState(0);+ const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);const toggle = (e?: React.MouseEvent) => {e?.stopPropagation();@@ -76,157 +107,427 @@ function AudioClip({ path, startTime, duration }: { path: string; startTime: numif (playing) {el.pause();setPlaying(false);+ setProgress(0);+ if (intervalRef.current) clearInterval(intervalRef.current);} else {el.currentTime = startTime;- el.play().then(() => setPlaying(true)).catch(() => setPlaying(false));+ el.play()+ .then(() => {+ setPlaying(true);+ intervalRef.current = setInterval(() => {+ const elapsed = el.currentTime - startTime;+ setProgress(Math.min((elapsed / duration) * 100, 100));+ }, 50);+ })+ .catch(() => setPlaying(false));setTimeout(() => {el.pause();setPlaying(false);+ setProgress(0);+ if (intervalRef.current) clearInterval(intervalRef.current);}, duration * 1000);}};+ useEffect(() => {+ return () => {+ if (intervalRef.current) clearInterval(intervalRef.current);+ };+ }, []);++ const iconSize = large ? "h-4 w-4" : "h-3 w-3";+ const btnSize = large ? "h-8 w-8" : "h-6 w-6";+return (- <>- <audio ref={audioRef} src={convertFileSrc(path)} preload="none" onEnded={() => setPlaying(false)} />- <Button variant="ghost" size="icon" className="h-6 w-6 shrink-0" onClick={toggle}>- {playing ? <Square className="h-3 w-3" /> : <Play className="h-3 w-3" />}+ <div className="flex items-center gap-1.5">+ <audio+ ref={audioRef}+ src={convertFileSrc(path)}+ preload="none"+ onEnded={() => {+ setPlaying(false);+ setProgress(0);+ if (intervalRef.current) clearInterval(intervalRef.current);+ }}+ />+ <Button+ variant={playing ? "default" : "ghost"}+ size="icon"+ className={`${btnSize} shrink-0 ${playing ? "bg-primary text-primary-foreground" : ""}`}+ onClick={toggle}+ >+ {playing ? (+ <Square className={iconSize} />+ ) : (+ <Play className={iconSize} />+ )}</Button>- </>+ {playing && (+ <div className="w-12 h-1 bg-muted rounded-full overflow-hidden">+ <div+ className="h-full bg-primary rounded-full transition-all duration-100"+ style={{ width: `${progress}%` }}+ />+ </div>+ )}+ <span className="text-[10px] text-muted-foreground font-mono shrink-0">+ {duration.toFixed(1)}s+ </span>+ </div>);}-function MergeBanner({- suggestions,+function QuickNameInput({+ speakerIds,+ onName,+ onHallucination,+ placeholder,+}: {+ speakerIds: number[];+ onName: (ids: number[], name: string) => Promise<void>;+ onHallucination: (ids: number[]) => Promise<void>;+ placeholder?: string;+}) {+ const [name, setName] = useState("");+ const [saving, setSaving] = useState(false);++ const save = async () => {+ if (!name.trim()) return;+ setSaving(true);+ await onName(speakerIds, name.trim());+ setSaving(false);+ setName("");+ };++ return (+ <div className="flex items-center gap-1.5" onClick={(e) => e.stopPropagation()}>+ <Input+ value={name}+ onChange={(e) => setName(e.target.value)}+ placeholder={placeholder || "who is this?"}+ className="h-7 text-xs flex-1 min-w-0"+ onKeyDown={(e) => {+ if (e.key === "Enter") save();+ }}+ />+ <Button+ variant="default"+ size="icon"+ className="h-7 w-7 shrink-0"+ disabled={saving || !name.trim()}+ onClick={save}+ >+ {saving ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <Check className="h-3 w-3" />+ )}+ </Button>+ <Button+ variant="ghost"+ size="icon"+ className="h-7 w-7 shrink-0 text-muted-foreground"+ title="not a real speaker (noise)"+ onClick={() => onHallucination(speakerIds)}+ >+ <UserX className="h-3 w-3" />+ </Button>+ </div>+ );+}++function ClusterCard({+ cluster,+ onNameCluster,+ onHallucination,onMerge,- onDismiss,+ onDelete,+ expandedId,+ setExpandedId,}: {- suggestions: MergeSuggestion[];+ cluster: SpeakerCluster;+ onNameCluster: (ids: number[], name: string) => Promise<void>;+ onHallucination: (ids: number[]) => Promise<void>;onMerge: (keepId: number, mergeId: number) => Promise<void>;- onDismiss: (speakerId: number, similarId: number) => void;+ onDelete: (id: number) => Promise<void>;+ expandedId: number | null;+ setExpandedId: (id: number | null) => void;}) {- const [current, setCurrent] = useState(0);- const [merging, setMerging] = useState(false);+ const { members } = cluster;+ const isMulti = members.length > 1;+ const allIds = members.map((m) => m.id);+ const latestTime = Math.max(...members.map(getLatestSampleTime));- if (suggestions.length === 0) return null;+ return (+ <div className="rounded-lg border border-amber-200 bg-amber-50/50 dark:border-amber-900/50 dark:bg-amber-950/20 overflow-hidden">+ <div className="px-3 py-2.5 space-y-2.5">+ {/* Cluster header */}+ <div className="flex items-center justify-between">+ <div className="flex items-center gap-2">+ {isMulti ? (+ <div className="flex -space-x-1.5">+ {members.slice(0, 3).map((_, i) => (+ <div+ key={i}+ className="h-6 w-6 rounded-full bg-amber-200 dark:bg-amber-900 border-2 border-amber-50 dark:border-amber-950 flex items-center justify-center text-[9px] font-mono text-amber-700 dark:text-amber-300"+ >+ ?+ </div>+ ))}+ {members.length > 3 && (+ <div className="h-6 w-6 rounded-full bg-amber-100 dark:bg-amber-900/50 border-2 border-amber-50 dark:border-amber-950 flex items-center justify-center text-[9px] font-mono text-amber-600">+ +{members.length - 3}+ </div>+ )}+ </div>+ ) : (+ <div className="h-7 w-7 rounded-full bg-amber-200 dark:bg-amber-900 flex items-center justify-center text-xs font-mono text-amber-700 dark:text-amber-300">+ ?+ </div>+ )}+ <div className="flex flex-col">+ <span className="text-xs font-medium">+ {isMulti+ ? `${members.length} similar voices`+ : `Speaker #${members[0].id}`}+ </span>+ {latestTime > 0 && (+ <span className="text-[10px] text-muted-foreground flex items-center gap-1">+ <Clock className="h-2.5 w-2.5" />+ {formatTimeAgo(latestTime)}+ </span>+ )}+ </div>+ </div>+ {isMulti && (+ <span className="text-[10px] font-medium uppercase tracking-wider text-amber-600 dark:text-amber-400 bg-amber-100 dark:bg-amber-900/50 px-1.5 py-0.5 rounded">+ cluster+ </span>+ )}+ </div>- const suggestion = suggestions[current];- if (!suggestion) return null;+ {/* Voice samples from each member */}+ <div className="space-y-1">+ {members.map((member) => {+ const samples = parseSamples(member.metadata);+ const sample = samples[0];+ if (!sample) return null;+ return (+ <div+ key={member.id}+ className="flex items-center gap-2 text-xs bg-background rounded px-2 py-1.5 border border-border/30 cursor-pointer hover:bg-muted/30"+ onClick={() =>+ setExpandedId(expandedId === member.id ? null : member.id)+ }+ >+ <AudioClip+ path={sample.path}+ startTime={sample.start_time}+ duration={sample.end_time - sample.start_time}+ />+ <span className="flex-1 truncate text-muted-foreground">+ “{sample.transcript}”+ </span>+ <span className="text-[10px] text-muted-foreground font-mono shrink-0">+ #{member.id}+ </span>+ </div>+ );+ })}+ </div>- const speakerSamples = parseSamples(suggestion.speaker.metadata);- const similarSamples = parseSamples(suggestion.similar.metadata);+ {/* Quick name input for the whole cluster */}+ <QuickNameInput+ speakerIds={allIds}+ onName={onNameCluster}+ onHallucination={onHallucination}+ placeholder={+ isMulti+ ? `name all ${members.length} as...`+ : "who is this?"+ }+ />+ </div>+ </div>+ );+}- const handleMerge = async () => {- setMerging(true);- try {- await onMerge(suggestion.speaker.id, suggestion.similar.id);- } finally {- setMerging(false);- if (current >= suggestions.length - 1) setCurrent(0);- }- };+function IdentifiedSpeakerCard({+ speaker,+ expanded,+ onToggle,+ onEdit,+ onDelete,+ onMerge,+ onRefresh,+}: {+ speaker: Speaker;+ expanded: boolean;+ onToggle: () => void;+ onEdit: (id: number, name: string) => Promise<void>;+ onDelete: (id: number) => Promise<void>;+ onMerge: (keepId: number, mergeId: number) => Promise<void>;+ onRefresh: () => void;+}) {+ const [editing, setEditing] = useState(false);+ const [editName, setEditName] = useState(speaker.name);+ const [saving, setSaving] = useState(false);+ const [deleting, setDeleting] = useState(false);+ const samples = parseSamples(speaker.metadata);+ const latestTime = getLatestSampleTime(speaker);- const handleDismiss = () => {- onDismiss(suggestion.speaker.id, suggestion.similar.id);- if (current >= suggestions.length - 1) setCurrent(Math.max(0, current - 1));+ const save = async () => {+ if (!editName.trim()) return;+ setSaving(true);+ await onEdit(speaker.id, editName.trim());+ setSaving(false);+ setEditing(false);};return (- <div className="rounded-lg border-2 border-dashed border-primary/30 bg-primary/5 p-4 space-y-3">- <div className="flex items-center justify-between">- <div className="flex items-center gap-2 text-sm font-medium">- <GitMerge className="h-4 w-4 text-primary" />- same person? ({current + 1}/{suggestions.length})- </div>- <div className="flex gap-1">- <Button- variant="ghost"- size="sm"- className="h-6 text-xs"- disabled={current === 0}- onClick={() => setCurrent(current - 1)}- >- prev- </Button>- <Button- variant="ghost"- size="sm"- className="h-6 text-xs"- disabled={current >= suggestions.length - 1}- onClick={() => setCurrent(current + 1)}- >- next- </Button>+ <div className="border border-border rounded-md overflow-hidden">+ <div+ className="flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-muted/30 transition-colors group"+ onClick={() => !editing && onToggle()}+ >+ <button+ className="shrink-0"+ onClick={(e) => {+ e.stopPropagation();+ onToggle();+ }}+ >+ {expanded ? (+ <ChevronDown className="h-3.5 w-3.5" />+ ) : (+ <ChevronRight className="h-3.5 w-3.5" />+ )}+ </button>++ <div className="h-8 w-8 rounded-full bg-primary/10 text-primary flex items-center justify-center text-xs font-medium shrink-0">+ {speaker.name.slice(0, 2).toUpperCase()}</div>- </div>- <div className="grid grid-cols-2 gap-3">- {/* Left speaker */}- <div className="rounded-md border border-border bg-background p-3 space-y-2">- <div className="flex items-center gap-2">- <div className="h-7 w-7 rounded-full bg-primary/10 flex items-center justify-center text-xs font-mono shrink-0">- {suggestion.speaker.isNamed ? suggestion.speaker.name.slice(0, 2).toUpperCase() : "?"}- </div>- <span className="text-sm font-medium truncate">- {suggestion.speaker.isNamed ? suggestion.speaker.name : `Speaker #${suggestion.speaker.id}`}- </span>+ {editing ? (+ <div+ className="flex items-center gap-1.5 flex-1"+ onClick={(e) => e.stopPropagation()}+ >+ <Input+ value={editName}+ onChange={(e) => setEditName(e.target.value)}+ placeholder="enter name..."+ className="h-7 text-sm"+ autoFocus+ onKeyDown={(e) => {+ if (e.key === "Enter") save();+ if (e.key === "Escape") setEditing(false);+ }}+ />+ <Button+ variant="ghost"+ size="icon"+ className="h-7 w-7"+ disabled={saving}+ onClick={save}+ >+ {saving ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <Check className="h-3.5 w-3.5" />+ )}+ </Button>+ <Button+ variant="ghost"+ size="icon"+ className="h-7 w-7"+ onClick={() => setEditing(false)}+ >+ <X className="h-3.5 w-3.5" />+ </Button></div>- {speakerSamples[0] && (- <div className="flex items-center gap-2 text-xs text-muted-foreground">- <AudioClip- path={speakerSamples[0].path}- startTime={speakerSamples[0].start_time}- duration={speakerSamples[0].end_time - speakerSamples[0].start_time}- />- <span className="truncate">“{speakerSamples[0].transcript.slice(0, 50)}”</span>+ ) : (+ <>+ <div className="flex-1 min-w-0 flex items-center gap-2">+ <span className="text-sm font-medium">{speaker.name}</span>+ <span className="text-xs text-muted-foreground">+ {samples.length} sample{samples.length !== 1 ? "s" : ""}+ </span>+ {latestTime > 0 && (+ <span className="text-[10px] text-muted-foreground">+ {formatTimeAgo(latestTime)}+ </span>+ )}</div>- )}- </div>- {/* Right speaker */}- <div className="rounded-md border border-border bg-background p-3 space-y-2">- <div className="flex items-center gap-2">- <div className="h-7 w-7 rounded-full bg-muted flex items-center justify-center text-xs font-mono shrink-0">- {suggestion.similar.name ? suggestion.similar.name.slice(0, 2).toUpperCase() : "?"}- </div>- <span className="text-sm font-medium truncate">- {suggestion.similar.name || `Speaker #${suggestion.similar.id}`}+ {/* Inline voice preview */}+ {samples[0] && (+ <div className="shrink-0" onClick={(e) => e.stopPropagation()}>+ <AudioClip+ path={samples[0].path}+ startTime={samples[0].start_time}+ duration={Math.min(+ samples[0].end_time - samples[0].start_time,+ 3+ )}+ />+ </div>+ )}++ <span className="text-xs text-muted-foreground font-mono">+ #{speaker.id}</span>- </div>- {similarSamples[0] && (- <div className="flex items-center gap-2 text-xs text-muted-foreground">- <AudioClip- path={similarSamples[0].path}- startTime={similarSamples[0].start_time}- duration={similarSamples[0].end_time - similarSamples[0].start_time}- />- <span className="truncate">“{similarSamples[0].transcript.slice(0, 50)}”</span>++ <div+ className="flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity"+ onClick={(e) => e.stopPropagation()}+ >+ <Button+ variant="ghost"+ size="icon"+ className="h-7 w-7"+ title="rename"+ onClick={() => {+ setEditing(true);+ setEditName(speaker.name || "");+ }}+ >+ <Pencil className="h-3 w-3" />+ </Button>+ <Button+ variant="ghost"+ size="icon"+ className="h-7 w-7 text-destructive"+ title="delete"+ disabled={deleting}+ onClick={async () => {+ setDeleting(true);+ try {+ await onDelete(speaker.id);+ } catch {+ } finally {+ setDeleting(false);+ }+ }}+ >+ {deleting ? (+ <Loader2 className="h-3 w-3 animate-spin" />+ ) : (+ <Trash2 className="h-3 w-3" />+ )}+ </Button></div>- )}- </div>+ </>+ )}</div>- <div className="flex justify-center gap-2">- <Button- variant="outline"- size="sm"- className="gap-1.5 border-green-300 text-green-600 hover:bg-green-100 hover:text-green-700"- disabled={merging}- onClick={handleMerge}- >- {merging ? <Loader2 className="h-3.5 w-3.5 animate-spin" /> : <ThumbsUp className="h-3.5 w-3.5" />}- yes, merge- </Button>- <Button- variant="outline"- size="sm"- className="gap-1.5"- onClick={handleDismiss}- >- <ThumbsDown className="h-3.5 w-3.5" />- different people- </Button>- </div>+ {expanded && (+ <SpeakerDetail+ speaker={speaker}+ onMerge={onMerge}+ onRefresh={onRefresh}+ />+ )}</div>);}@@ -249,14 +550,23 @@ function SpeakerDetail({setLoadingSimilar(true);const controller = new AbortController();const timeout = setTimeout(() => controller.abort(), 5000);- fetch(`http://localhost:3030/speakers/similar?speaker_id=${speaker.id}&limit=5`, {- signal: controller.signal,- })+ fetch(+ `http://localhost:3030/speakers/similar?speaker_id=${speaker.id}&limit=5`,+ {+ signal: controller.signal,+ }+ ).then((r) => r.json()).then((data) => setSimilar(Array.isArray(data) ? data : [])).catch(() => setSimilar([]))- .finally(() => { clearTimeout(timeout); setLoadingSimilar(false); });- return () => { controller.abort(); clearTimeout(timeout); };+ .finally(() => {+ clearTimeout(timeout);+ setLoadingSimilar(false);+ });+ return () => {+ controller.abort();+ clearTimeout(timeout);+ };}, [speaker.id]);return (@@ -267,18 +577,28 @@ function SpeakerDetail({voice samples ({samples.length})</h4>{samples.length === 0 && (- <p className="text-xs text-muted-foreground">no audio samples stored</p>+ <p className="text-xs text-muted-foreground">+ no audio samples stored+ </p>)}{samples.map((s, i) => (<divkey={i}className="flex items-center gap-2 text-xs bg-background rounded px-2 py-1.5 border border-border/30">- <AudioClip path={s.path} startTime={s.start_time} duration={s.end_time - s.start_time} />- <span className="flex-1 truncate text-muted-foreground">“{s.transcript}”</span>- <span className="text-muted-foreground font-mono shrink-0">- {(s.end_time - s.start_time).toFixed(1)}s+ <AudioClip+ path={s.path}+ startTime={s.start_time}+ duration={s.end_time - s.start_time}+ />+ <span className="flex-1 truncate text-muted-foreground">+ “{s.transcript}”</span>+ {s.end_time > 0 && (+ <span className="text-[10px] text-muted-foreground shrink-0">+ {formatTimeAgo(s.end_time)}+ </span>+ )}</div>))}</div>@@ -292,7 +612,9 @@ function SpeakerDetail({<p className="text-xs text-muted-foreground">searching...</p>)}{!loadingSimilar && similar.length === 0 && (- <p className="text-xs text-muted-foreground">no similar speakers found</p>+ <p className="text-xs text-muted-foreground">+ no similar speakers found+ </p>)}{similar.map((s) => {const simSamples = parseSamples(s.metadata);@@ -312,7 +634,9 @@ function SpeakerDetail({/>)}<div className="flex-1 min-w-0">- <span className="font-medium">{s.name || `Speaker #${s.id}`}</span>+ <span className="font-medium">+ {s.name || `Speaker #${s.id}`}+ </span></div><Buttonvariant="outline"@@ -339,136 +663,157 @@ function SpeakerDetail({);}-function SpeakerRow({- speaker,- isNamed,- expanded,- onToggle,- onEdit,- onDelete,- onHallucination,+function MergeBanner({+ suggestions,onMerge,- onRefresh,+ onDismiss,}: {- speaker: Speaker;- isNamed: boolean;- expanded: boolean;- onToggle: () => void;- onEdit: (id: number, name: string) => Promise<void>;- onDelete: (id: number) => Promise<void>;- onHallucination: (id: number) => Promise<void>;+ suggestions: { speaker: Speaker & { isNamed: boolean }; similar: SimilarSpeaker }[];onMerge: (keepId: number, mergeId: number) => Promise<void>;- onRefresh: () => void;+ onDismiss: (speakerId: number, similarId: number) => void;}) {- const [editing, setEditing] = useState(false);- const [editName, setEditName] = useState(speaker.name);- const [saving, setSaving] = useState(false);- const [deleting, setDeleting] = useState(false);+ const [current, setCurrent] = useState(0);+ const [merging, setMerging] = useState(false);- const samples = parseSamples(speaker.metadata);+ if (suggestions.length === 0) return null;- const save = async () => {- if (!editName.trim()) return;- setSaving(true);- await onEdit(speaker.id, editName.trim());- setSaving(false);- setEditing(false);+ const suggestion = suggestions[current];+ if (!suggestion) return null;++ const speakerSamples = parseSamples(suggestion.speaker.metadata);+ const similarSamples = parseSamples(suggestion.similar.metadata);++ const handleMerge = async () => {+ setMerging(true);+ try {+ await onMerge(suggestion.speaker.id, suggestion.similar.id);+ } finally {+ setMerging(false);+ if (current >= suggestions.length - 1) setCurrent(0);+ }+ };++ const handleDismiss = () => {+ onDismiss(suggestion.speaker.id, suggestion.similar.id);+ if (current >= suggestions.length - 1)+ setCurrent(Math.max(0, current - 1));};return (- <div className="border border-border rounded-md overflow-hidden">- <div- className="flex items-center gap-3 px-3 py-2 cursor-pointer hover:bg-muted/30 transition-colors group"- onClick={() => !editing && onToggle()}- >- <button className="shrink-0" onClick={(e) => { e.stopPropagation(); onToggle(); }}>- {expanded ? <ChevronDown className="h-3.5 w-3.5" /> : <ChevronRight className="h-3.5 w-3.5" />}- </button>- <div className={`h-8 w-8 rounded-full flex items-center justify-center text-xs font-mono shrink-0 ${isNamed ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"}`}>- {isNamed ? speaker.name.slice(0, 2).toUpperCase() : "?"}+ <div className="rounded-lg border-2 border-dashed border-primary/30 bg-primary/5 p-4 space-y-3">+ <div className="flex items-center justify-between">+ <div className="flex items-center gap-2 text-sm font-medium">+ <GitMerge className="h-4 w-4 text-primary" />+ same person? ({current + 1}/{suggestions.length})</div>- {editing ? (- <div className="flex items-center gap-1.5 flex-1" onClick={(e) => e.stopPropagation()}>- <Input- value={editName}- onChange={(e) => setEditName(e.target.value)}- placeholder="enter name..."- className="h-7 text-sm"- autoFocus- onKeyDown={(e) => {- if (e.key === "Enter") save();- if (e.key === "Escape") setEditing(false);- }}- />- <Button variant="ghost" size="icon" className="h-7 w-7" disabled={saving} onClick={save}>- {saving ? <Loader2 className="h-3.5 w-3.5 animate-spin" /> : <Check className="h-3.5 w-3.5" />}- </Button>- <Button variant="ghost" size="icon" className="h-7 w-7" onClick={() => setEditing(false)}>- <X className="h-3.5 w-3.5" />- </Button>+ <div className="flex gap-1">+ <Button+ variant="ghost"+ size="sm"+ className="h-6 text-xs"+ disabled={current === 0}+ onClick={() => setCurrent(current - 1)}+ >+ prev+ </Button>+ <Button+ variant="ghost"+ size="sm"+ className="h-6 text-xs"+ disabled={current >= suggestions.length - 1}+ onClick={() => setCurrent(current + 1)}+ >+ next+ </Button>+ </div>+ </div>++ <div className="grid grid-cols-2 gap-3">+ {/* Left speaker */}+ <div className="rounded-md border border-border bg-background p-3 space-y-2">+ <div className="flex items-center gap-2">+ <div className="h-7 w-7 rounded-full bg-primary/10 flex items-center justify-center text-xs font-mono shrink-0">+ {suggestion.speaker.isNamed+ ? suggestion.speaker.name.slice(0, 2).toUpperCase()+ : "?"}+ </div>+ <span className="text-sm font-medium truncate">+ {suggestion.speaker.isNamed+ ? suggestion.speaker.name+ : `Speaker #${suggestion.speaker.id}`}+ </span></div>- ) : (- <>- <div className="flex-1 min-w-0 flex items-center gap-2">- <span className="text-sm">{isNamed ? speaker.name : `Speaker #${speaker.id}`}</span>- {!isNamed && (- <span className="text-[10px] font-medium uppercase tracking-wider text-amber-500 bg-amber-500/10 px-1.5 py-0.5 rounded">- needs name- </span>- )}- {samples.length > 0 && (- <span className="text-xs text-muted-foreground">- {samples.length} sample{samples.length !== 1 ? "s" : ""}- </span>- )}+ {speakerSamples[0] && (+ <div className="space-y-1">+ <AudioClip+ path={speakerSamples[0].path}+ startTime={speakerSamples[0].start_time}+ duration={+ speakerSamples[0].end_time - speakerSamples[0].start_time+ }+ />+ <p className="text-xs text-muted-foreground truncate pl-1">+ “{speakerSamples[0].transcript.slice(0, 60)}”+ </p></div>- {/* Inline voice preview */}- {samples[0] && (- <div className="shrink-0" onClick={(e) => e.stopPropagation()}>- <AudioClip- path={samples[0].path}- startTime={samples[0].start_time}- duration={Math.min(samples[0].end_time - samples[0].start_time, 3)}- />- </div>- )}- <span className="text-xs text-muted-foreground font-mono">#{speaker.id}</span>- <div className="flex gap-0.5 opacity-0 group-hover:opacity-100 transition-opacity" onClick={(e) => e.stopPropagation()}>- <Button- variant="ghost"- size="icon"- className="h-7 w-7"- title={isNamed ? "rename" : "assign name"}- onClick={() => { setEditing(true); setEditName(speaker.name || ""); }}- >- {isNamed ? <Pencil className="h-3 w-3" /> : <UserCheck className="h-3 w-3" />}- </Button>- {!isNamed && (- <Button- variant="ghost"- size="icon"- className="h-7 w-7"- title="false detection"- onClick={() => onHallucination(speaker.id)}- >- <UserX className="h-3 w-3" />- </Button>- )}- <Button- variant="ghost"- size="icon"- className="h-7 w-7 text-destructive"- title="delete"- disabled={deleting}- onClick={async () => { setDeleting(true); try { await onDelete(speaker.id); } catch {} finally { setDeleting(false); } }}- >- {deleting ? <Loader2 className="h-3 w-3 animate-spin" /> : <Trash2 className="h-3 w-3" />}- </Button>+ )}+ </div>++ {/* Right speaker */}+ <div className="rounded-md border border-border bg-background p-3 space-y-2">+ <div className="flex items-center gap-2">+ <div className="h-7 w-7 rounded-full bg-muted flex items-center justify-center text-xs font-mono shrink-0">+ {suggestion.similar.name+ ? suggestion.similar.name.slice(0, 2).toUpperCase()+ : "?"}</div>- </>- )}+ <span className="text-sm font-medium truncate">+ {suggestion.similar.name ||+ `Speaker #${suggestion.similar.id}`}+ </span>+ </div>+ {similarSamples[0] && (+ <div className="space-y-1">+ <AudioClip+ path={similarSamples[0].path}+ startTime={similarSamples[0].start_time}+ duration={+ similarSamples[0].end_time - similarSamples[0].start_time+ }+ />+ <p className="text-xs text-muted-foreground truncate pl-1">+ “{similarSamples[0].transcript.slice(0, 60)}”+ </p>+ </div>+ )}+ </div>+ </div>++ <div className="flex justify-center gap-2">+ <Button+ variant="outline"+ size="sm"+ className="gap-1.5 border-green-300 text-green-600 hover:bg-green-100 hover:text-green-700"+ disabled={merging}+ onClick={handleMerge}+ >+ {merging ? (+ <Loader2 className="h-3.5 w-3.5 animate-spin" />+ ) : (+ <ThumbsUp className="h-3.5 w-3.5" />+ )}+ yes, merge+ </Button>+ <Button+ variant="outline"+ size="sm"+ className="gap-1.5"+ onClick={handleDismiss}+ >+ <ThumbsDown className="h-3.5 w-3.5" />+ different people+ </Button></div>- {expanded && <SpeakerDetail speaker={speaker} onMerge={onMerge} onRefresh={onRefresh} />}</div>);}@@ -479,8 +824,14 @@ export function SpeakersSection() {const [loading, setLoading] = useState(true);const [searchQuery, setSearchQuery] = useState("");const [expandedId, setExpandedId] = useState<number | null>(null);- const [mergeSuggestions, setMergeSuggestions] = useState<MergeSuggestion[]>([]);- const [dismissedPairs, setDismissedPairs] = useState<Set<string>>(new Set());+ const [mergeSuggestions, setMergeSuggestions] = useState<+ { speaker: Speaker & { isNamed: boolean }; similar: SimilarSpeaker }[]+ >([]);+ const [dismissedPairs, setDismissedPairs] = useState<Set<string>>(+ new Set()+ );+ const [clusters, setClusters] = useState<SpeakerCluster[]>([]);+ const [clusterLoading, setClusterLoading] = useState(false);const [, setSection] = useQueryState("section");const { toast } = useToast();@@ -490,45 +841,127 @@ export function SpeakersSection() {fetch("http://localhost:3030/speakers/search"),fetch("http://localhost:3030/speakers/unnamed?limit=50"),]);- if (namedRes.ok) setSpeakers(await namedRes.json().then((d: any) => (Array.isArray(d) ? d : [])));- if (unnamedRes.ok) setUnnamed(await unnamedRes.json().then((d: any) => (Array.isArray(d) ? d : [])));- } catch { /* server not running */ }- finally { setLoading(false); }+ if (namedRes.ok)+ setSpeakers(+ await namedRes.json().then((d: any) => (Array.isArray(d) ? d : []))+ );+ if (unnamedRes.ok)+ setUnnamed(+ await unnamedRes+ .json()+ .then((d: any) => (Array.isArray(d) ? d : []))+ );+ } catch {+ /* server not running */+ } finally {+ setLoading(false);+ }}, []);- useEffect(() => { fetchSpeakers(); }, [fetchSpeakers]);+ useEffect(() => {+ fetchSpeakers();+ }, [fetchSpeakers]);- // Fetch merge suggestions for unnamed speakers+ // Build clusters from unnamed speakers using similarityuseEffect(() => {- if (unnamed.length === 0) return;+ if (unnamed.length === 0) {+ setClusters([]);+ return;+ }+const controller = new AbortController();+ setClusterLoading(true);- const fetchSuggestions = async () => {- const suggestions: MergeSuggestion[] = [];- // Check first 5 unnamed speakers for similar matches- const toCheck = unnamed.slice(0, 5);+ const buildClusters = async () => {+ const assigned = new Set<number>();+ const newClusters: SpeakerCluster[] = [];++ // Fetch similar speakers for each unnamed speaker+ const similarMap = new Map<number, number[]>();await Promise.allSettled(- toCheck.map(async (speaker) => {+ unnamed.map(async (speaker) => {try {const res = await fetch(- `http://localhost:3030/speakers/similar?speaker_id=${speaker.id}&limit=1`,+ `http://localhost:3030/speakers/similar?speaker_id=${speaker.id}&limit=5`,{ signal: controller.signal });if (!res.ok) return;const data = await res.json();- if (Array.isArray(data) && data.length > 0) {- suggestions.push({- speaker: { ...speaker, isNamed: false },- similar: data[0],- });+ if (Array.isArray(data)) {+ // Only keep unnamed similar speakers for clustering+ const unnamedIds = new Set(unnamed.map((u) => u.id));+ const similarIds = data+ .filter(+ (s: SimilarSpeaker) => !s.name && unnamedIds.has(s.id)+ )+ .map((s: SimilarSpeaker) => s.id);+ similarMap.set(speaker.id, similarIds);}} catch {}}));- // Also check named speakers- const namedToCheck = speakers.slice(0, 3);++ // Union-find style clustering+ for (const speaker of unnamed) {+ if (assigned.has(speaker.id)) continue;+ const clusterIds = new Set<number>([speaker.id]);+ const queue = [speaker.id];++ while (queue.length > 0) {+ const current = queue.pop()!;+ const similars = similarMap.get(current) || [];+ for (const simId of similars) {+ if (!assigned.has(simId) && !clusterIds.has(simId)) {+ clusterIds.add(simId);+ queue.push(simId);+ }+ }+ }++ const members = unnamed.filter((u) => clusterIds.has(u.id));+ for (const m of members) assigned.add(m.id);++ const firstSample = members+ .flatMap((m) => parseSamples(m.metadata))+ .find(Boolean) || null;++ newClusters.push({+ members,+ representativeSample: firstSample,+ });+ }++ // Sort clusters: multi-member first, then by recency+ newClusters.sort((a, b) => {+ if (a.members.length > 1 && b.members.length <= 1) return -1;+ if (a.members.length <= 1 && b.members.length > 1) return 1;+ const aTime = Math.max(...a.members.map(getLatestSampleTime));+ const bTime = Math.max(...b.members.map(getLatestSampleTime));+ return bTime - aTime;+ });++ setClusters(newClusters);+ setClusterLoading(false);+ };++ buildClusters();+ return () => controller.abort();+ }, [unnamed]);++ // Fetch merge suggestions (named speakers with unnamed duplicates)+ useEffect(() => {+ if (unnamed.length === 0 && speakers.length === 0) return;+ const controller = new AbortController();++ const fetchSuggestions = async () => {+ const suggestions: {+ speaker: Speaker & { isNamed: boolean };+ similar: SimilarSpeaker;+ }[] = [];++ // Check named speakers for unnamed duplicatesawait Promise.allSettled(- namedToCheck.map(async (speaker) => {+ speakers.slice(0, 10).map(async (speaker) => {try {const res = await fetch(`http://localhost:3030/speakers/similar?speaker_id=${speaker.id}&limit=1`,@@ -545,6 +978,7 @@ export function SpeakersSection() {} catch {}}));+setMergeSuggestions(suggestions);};@@ -554,7 +988,8 @@ export function SpeakersSection() {const updateSpeaker = async (id: number, name: string) => {const res = await fetch("http://localhost:3030/speakers/update", {- method: "POST", headers: { "Content-Type": "application/json" },+ method: "POST",+ headers: { "Content-Type": "application/json" },body: JSON.stringify({ id, name }),});if (!res.ok) throw new Error("failed");@@ -564,7 +999,8 @@ export function SpeakersSection() {const deleteSpeaker = async (id: number) => {const res = await fetch("http://localhost:3030/speakers/delete", {- method: "POST", headers: { "Content-Type": "application/json" },+ method: "POST",+ headers: { "Content-Type": "application/json" },body: JSON.stringify({ id }),});if (!res.ok) throw new Error("failed");@@ -575,7 +1011,8 @@ export function SpeakersSection() {const markHallucination = async (id: number) => {const res = await fetch("http://localhost:3030/speakers/hallucination", {- method: "POST", headers: { "Content-Type": "application/json" },+ method: "POST",+ headers: { "Content-Type": "application/json" },body: JSON.stringify({ speaker_id: id }),});if (!res.ok) throw new Error("failed");@@ -585,14 +1022,40 @@ export function SpeakersSection() {const mergeSpeakers = async (keepId: number, mergeId: number) => {const res = await fetch("http://localhost:3030/speakers/merge", {- method: "POST", headers: { "Content-Type": "application/json" },- body: JSON.stringify({ speaker_id_to_keep: keepId, speaker_id_to_merge: mergeId }),+ method: "POST",+ headers: { "Content-Type": "application/json" },+ body: JSON.stringify({+ speaker_id_to_keep: keepId,+ speaker_id_to_merge: mergeId,+ }),});if (!res.ok) throw new Error("failed");toast({ title: "speakers merged" });fetchSpeakers();};+ // Name a cluster: name the first speaker, merge the rest into it+ const nameCluster = async (ids: number[], name: string) => {+ if (ids.length === 0) return;+ const keepId = ids[0];+ await updateSpeaker(keepId, name);+ // Merge remaining into the first+ for (let i = 1; i < ids.length; i++) {+ try {+ await mergeSpeakers(keepId, ids[i]);+ } catch {}+ }+ };++ // Mark all cluster members as hallucination+ const hallucinateCluster = async (ids: number[]) => {+ for (const id of ids) {+ try {+ await markHallucination(id);+ } catch {}+ }+ };+const dismissMergeSuggestion = (speakerId: number, similarId: number) => {const key = `${speakerId}-${similarId}`;setDismissedPairs((prev) => new Set(prev).add(key));@@ -602,23 +1065,31 @@ export function SpeakersSection() {(s) => !dismissedPairs.has(`${s.speaker.id}-${s.similar.id}`));- const namedSpeakers = speakers- .filter((s) => !searchQuery || s.name.toLowerCase().includes(searchQuery.toLowerCase()) || `#${s.id}`.includes(searchQuery))- .map((s) => ({ ...s, isNamed: true }));+ const filteredSpeakers = speakers.filter(+ (s) =>+ !searchQuery ||+ s.name.toLowerCase().includes(searchQuery.toLowerCase()) ||+ `#${s.id}`.includes(searchQuery)+ );- const unnamedSpeakers = unnamed- .filter((s) => !searchQuery || `#${s.id}`.includes(searchQuery))- .map((s) => ({ ...s, isNamed: false }));+ const filteredClusters = searchQuery+ ? clusters.filter((c) =>+ c.members.some((m) => `#${m.id}`.includes(searchQuery))+ )+ : clusters;const total = speakers.length + unnamed.length;const namedCount = speakers.length;const progress = total > 0 ? Math.round((namedCount / total) * 100) : 0;+ const multiClusters = clusters.filter((c) => c.members.length > 1);if (loading) {return (<div className="space-y-4"><Skeleton className="h-8 w-full" />- {[1, 2, 3, 4].map((i) => <Skeleton key={i} className="h-14 w-full" />)}+ {[1, 2, 3, 4].map((i) => (+ <Skeleton key={i} className="h-14 w-full" />+ ))}</div>);}@@ -632,55 +1103,86 @@ export function SpeakersSection() {<span className="text-muted-foreground">{namedCount} of {total} speakers identified</span>- <span className="font-mono text-xs text-muted-foreground">{progress}%</span>+ <span className="font-mono text-xs text-muted-foreground">+ {progress}%+ </span></div><Progress value={progress} className="h-2" /></div>)}- {/* Merge suggestions banner */}+ {/* Attention needed banner */}+ {unnamed.length > 0 && (+ <div className="rounded-lg bg-amber-50 dark:bg-amber-950/30 border border-amber-200 dark:border-amber-900/50 p-3">+ <div className="flex items-center gap-2 text-sm">+ <AlertCircle className="h-4 w-4 text-amber-500 shrink-0" />+ <span className="font-medium text-amber-700 dark:text-amber-400">+ {unnamed.length} unidentified speaker+ {unnamed.length !== 1 ? "s" : ""}+ </span>+ {multiClusters.length > 0 && (+ <span className="text-xs text-amber-600 dark:text-amber-500">+ ({multiClusters.length} cluster+ {multiClusters.length !== 1 ? "s" : ""} of similar voices)+ </span>+ )}+ </div>+ <p className="text-xs text-amber-600/80 dark:text-amber-500/80 mt-1 ml-6">+ unidentified speakers show as “Speaker #N” in meeting+ notes and pipes. name them below to fix downstream output.+ </p>+ </div>+ )}++ {/* Merge suggestions for named speakers */}<MergeBannersuggestions={activeSuggestions}onMerge={mergeSpeakers}onDismiss={dismissMergeSuggestion}/>- <div className="relative">- <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />- <Input- placeholder="search speakers..."- value={searchQuery}- onChange={(e) => setSearchQuery(e.target.value)}- className="pl-9 h-9"- />- </div>-- <div className="flex items-center justify-between">- <span className="text-xs text-muted-foreground">- {speakers.length} named · {unnamed.length} unnamed- </span>+ <div className="flex items-center gap-2">+ <div className="relative flex-1">+ <Search className="absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground" />+ <Input+ placeholder="search speakers..."+ value={searchQuery}+ onChange={(e) => setSearchQuery(e.target.value)}+ className="pl-9 h-9"+ />+ </div><Buttonvariant="outline"size="sm"- className="h-7 text-xs gap-1.5"+ className="h-9 text-xs gap-1.5 shrink-0"onClick={async () => {- const allSpeakers = [...namedSpeakers, ...unnamedSpeakers];+ const allSpeakers = [+ ...speakers.map((s) => ({ ...s, isNamed: true })),+ ...unnamed.map((s) => ({ ...s, isNamed: false })),+ ];const speakerSummary = allSpeakers.map((s) => {const samples = parseSamples(s.metadata);- const transcripts = samples.map((sa) => sa.transcript).filter(Boolean).join("; ");+ const transcripts = samples+ .map((sa) => sa.transcript)+ .filter(Boolean)+ .join("; ");return `- ${s.isNamed ? s.name : `unnamed #${s.id}`} (id=${s.id}, ${s.isNamed ? "named" : "unnamed"})${transcripts ? `: "${transcripts}"` : ""}`;}).join("\n");const prefillData = {context: `here are my current speakers:\n${speakerSummary}\n\nYou have access to the screenpipe API to manage speakers:\n- POST /speakers/update {id, name} to rename\n- POST /speakers/merge {speaker_id_to_keep, speaker_id_to_merge} to merge duplicates\n- POST /speakers/delete {speaker_id} to delete\n- POST /speakers/hallucination {speaker_id} to mark false detections`,- prompt: "look at my speakers and help me organize them. find likely duplicates to merge, suggest better names for vague ones, and flag any that look like false detections. make the changes directly via the API.",+ prompt:+ "look at my speakers and help me organize them. find likely duplicates to merge, suggest better names for vague ones, and flag any that look like false detections. make the changes directly via the API.",autoSend: true,source: "speakers-organize",};- sessionStorage.setItem("pendingChatPrefill", JSON.stringify(prefillData));+ sessionStorage.setItem(+ "pendingChatPrefill",+ JSON.stringify(prefillData)+ );await setSection("home");setTimeout(() => emit("chat-prefill", prefillData), 300);}}@@ -690,50 +1192,57 @@ export function SpeakersSection() {</Button></div>- {/* Named speakers */}- {namedSpeakers.length > 0 && (- <div className="space-y-1.5">+ {/* === UNIDENTIFIED CLUSTERS (top priority) === */}+ {filteredClusters.length > 0 && (+ <div className="space-y-2"><h3 className="text-xs font-medium text-muted-foreground uppercase tracking-wide flex items-center gap-1.5">- <Volume2 className="h-3 w-3" />- identified ({namedSpeakers.length})+ <Users className="h-3 w-3" />+ pending identification ({unnamed.length} speaker+ {unnamed.length !== 1 ? "s" : ""} in {filteredClusters.length}{" "}+ group{filteredClusters.length !== 1 ? "s" : ""})</h3>- {namedSpeakers.map((s) => (- <SpeakerRow- key={s.id}- speaker={s}- isNamed={true}- expanded={expandedId === s.id}- onToggle={() => setExpandedId(expandedId === s.id ? null : s.id)}- onEdit={updateSpeaker}- onDelete={deleteSpeaker}- onHallucination={markHallucination}- onMerge={mergeSpeakers}- onRefresh={fetchSpeakers}- />- ))}+ {clusterLoading ? (+ <div className="space-y-2">+ {[1, 2].map((i) => (+ <Skeleton key={i} className="h-28 w-full" />+ ))}+ </div>+ ) : (+ <div className="grid gap-2">+ {filteredClusters.map((cluster, i) => (+ <ClusterCard+ key={cluster.members.map((m) => m.id).join("-")}+ cluster={cluster}+ onNameCluster={nameCluster}+ onHallucination={hallucinateCluster}+ onMerge={mergeSpeakers}+ onDelete={deleteSpeaker}+ expandedId={expandedId}+ setExpandedId={setExpandedId}+ />+ ))}+ </div>+ )}</div>)}- {/* Unnamed speakers */}- {unnamedSpeakers.length > 0 && (+ {/* === IDENTIFIED SPEAKERS === */}+ {filteredSpeakers.length > 0 && (<div className="space-y-1.5"><h3 className="text-xs font-medium text-muted-foreground uppercase tracking-wide flex items-center gap-1.5">- <UserX className="h-3 w-3" />- unidentified ({unnamedSpeakers.length})+ <Volume2 className="h-3 w-3" />+ identified ({filteredSpeakers.length})</h3>- <p className="text-xs text-muted-foreground">- play a voice sample, then assign a name or mark as false detection- </p>- {unnamedSpeakers.map((s) => (- <SpeakerRow+ {filteredSpeakers.map((s) => (+ <IdentifiedSpeakerCardkey={s.id}speaker={s}- isNamed={false}expanded={expandedId === s.id}- onToggle={() => setExpandedId(expandedId === s.id ? null : s.id)}+ onToggle={() =>+ setExpandedId(expandedId === s.id ? null : s.id)+ }onEdit={updateSpeaker}onDelete={deleteSpeaker}- onHallucination={markHallucination}onMerge={mergeSpeakers}onRefresh={fetchSpeakers}/>@@ -741,9 +1250,11 @@ export function SpeakersSection() {</div>)}- {namedSpeakers.length === 0 && unnamedSpeakers.length === 0 && (+ {filteredSpeakers.length === 0 && filteredClusters.length === 0 && (<p className="text-sm text-muted-foreground py-8 text-center">- {searchQuery ? "no speakers match your search" : "no speakers detected yet"}+ {searchQuery+ ? "no speakers match your search"+ : "no speakers detected yet"}</p>)}</div>diff --git a/crates/screenpipe-core/src/pipes/mod.rs b/crates/screenpipe-core/src/pipes/mod.rsindex 1a1b8055e..c93951eaf 100644--- a/crates/screenpipe-core/src/pipes/mod.rs+++ b/crates/screenpipe-core/src/pipes/mod.rs@@ -780,8 +780,8 @@ pub type OnPipeRunComplete = Arc<dyn Fn(&str, bool, f64, Option<&str>) + Send +/// Args: (pipe_name, execution_id, line)pub type OnPipeOutputLine = Arc<dyn Fn(&str, i64, &str) + Send + Sync>;-/// Default execution timeout: 5 minutes.-const DEFAULT_TIMEOUT_SECS: u64 = 300;+/// Default execution timeout: 10 minutes.+const DEFAULT_TIMEOUT_SECS: u64 = 600;/// Set up permissions for a Pi pipe: install extension, filtered skills,/// write the permissions JSON file, and register the token with the server.