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(search): add hover-to-expand and AI chat integration
Louis Beaumonte7a842ca2f84
diff --git a/screenpipe-app-tauri/app/search/page.tsx b/screenpipe-app-tauri/app/search/page.tsxindex 925e6e1fa..e5f6bc598 100644--- a/screenpipe-app-tauri/app/search/page.tsx+++ b/screenpipe-app-tauri/app/search/page.tsx@@ -6,13 +6,13 @@ import { SearchBar } from "@/components/rewind/search-bar";import { Button } from "@/components/ui/button";import { useDebounce } from "@/lib/hooks/use-debounce";import { useKeywordSearchStore } from "@/lib/hooks/use-keyword-search-store";-import { endOfDay, startOfDay } from "date-fns";+import { endOfDay, startOfDay, format } from "date-fns";import { useCallback, useEffect, useRef, Suspense } from "react";import { parser } from "@/lib/keyword-parser";import { CurrentFrame } from "@/components/rewind/current-frame-search";import { useKeywordParams } from "@/lib/hooks/use-keyword-params";import { AppSelect } from "@/components/rewind/search-command";-import { ArrowLeft, Clock } from "lucide-react";+import { ArrowLeft, Clock, MessageSquare } from "lucide-react";import { emit } from "@tauri-apps/api/event";import { commands } from "@/lib/utils/tauri";@@ -112,23 +112,41 @@ function SearchPage() {<div className="relative"><CurrentFrame />{currentResultIndex >= 0 && searchResults[currentResultIndex] && (- <Button- variant="secondary"- size="sm"- className="absolute bottom-2 right-2 gap-1.5"- onClick={async () => {- const timestamp = searchResults[currentResultIndex].timestamp;- // Show main timeline window- await commands.showWindow("Main");- // Emit event to navigate to the timestamp- await emit("navigate-to-timestamp", timestamp);- // Close search window- await commands.closeWindow({ Search: { query: null } });- }}- >- <Clock className="h-3.5 w-3.5" />- view in timeline- </Button>+ <div className="absolute bottom-2 right-2 flex gap-2">+ <Button+ variant="secondary"+ size="sm"+ className="gap-1.5"+ onClick={async () => {+ const result = searchResults[currentResultIndex];+ // Build context for AI chat+ const context = `Context from search result:\n${result.app_name} - ${result.window_name}\nTime: ${format(new Date(result.timestamp), "PPpp")}\n\nText:\n${result.text || ""}`;+ // Open AI chat window with context+ await commands.showWindow("Chat");+ await emit("chat-prefill", { context });+ }}+ >+ <MessageSquare className="h-3.5 w-3.5" />+ ask AI+ </Button>+ <Button+ variant="secondary"+ size="sm"+ className="gap-1.5"+ onClick={async () => {+ const timestamp = searchResults[currentResultIndex].timestamp;+ // Show main timeline window+ await commands.showWindow("Main");+ // Emit event to navigate to the timestamp+ await emit("navigate-to-timestamp", timestamp);+ // Close search window+ await commands.closeWindow({ Search: { query: null } });+ }}+ >+ <Clock className="h-3.5 w-3.5" />+ view in timeline+ </Button>+ </div>)}</div></div>diff --git a/screenpipe-app-tauri/components/rewind/image-card.tsx b/screenpipe-app-tauri/components/rewind/image-card.tsxindex 156331585..d75d85e93 100644--- a/screenpipe-app-tauri/components/rewind/image-card.tsx+++ b/screenpipe-app-tauri/components/rewind/image-card.tsx@@ -191,7 +191,7 @@ export const ImageGrid = ({key={result.frame_id}data-timestamp={result.timestamp}className={cn(- "group flex flex-col relative overflow-hidden bg-card border border-border transition-all duration-200 cursor-pointer",+ "group flex flex-col relative overflow-hidden bg-card border border-border transition-all duration-200 cursor-pointer hover:scale-[1.02] hover:shadow-lg hover:z-10",currentResultIndex === index && "ring-1 ring-foreground",)}onClick={() => setCurrentResultIndex(index)}@@ -207,9 +207,15 @@ export const ImageGrid = ({<p className="text-sm font-mono truncate">{result.app_name}</p>- <p className="text-xs font-mono text-muted-foreground truncate">+ <p className="text-xs font-mono text-muted-foreground truncate group-hover:whitespace-normal group-hover:line-clamp-2">{result.window_name}</p>+ {/* Expanded text preview on hover */}+ {result.text && (+ <p className="text-xs text-muted-foreground/70 hidden group-hover:block group-hover:line-clamp-3 mt-1 pt-1 border-t border-border/50">+ {result.text}+ </p>+ )}</div></div>))}