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(chat): unify media to standard markdown  syntax
Louis Beaumont2a0f03e3047b
diff --git a/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx b/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsxindex 0c0e057a8..f0446acc8 100644--- a/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/ai-presets-selector.tsx@@ -116,9 +116,8 @@ interface OpenAIModel {}export const DEFAULT_PROMPT = `Rules:-- You can show videos to the user by putting the .mp4 file path in an inline code block like this: \`/absolute/path/to/file.mp4\`-- Use the exact absolute file_path from the file_path property, do not modify it-- Do not wrap video paths in markdown links like [](.mp4), just use inline backticks+- Media: use standard markdown  for videos and  for images+- Use the exact absolute file_path from search results, do not modify it- Always answer my question/intent, do not make up things`;diff --git a/apps/screenpipe-app-tauri/components/rewind/chat-message.tsx b/apps/screenpipe-app-tauri/components/rewind/chat-message.tsxindex f6e407fc6..ab7ff6a4f 100644--- a/apps/screenpipe-app-tauri/components/rewind/chat-message.tsx+++ b/apps/screenpipe-app-tauri/components/rewind/chat-message.tsx@@ -174,6 +174,10 @@ export function ChatMessage({ message, ...props }: ChatMessageProps) {},img({ src, alt, ...props }) {if (!src) return null;+ //  → render video player+ if (src.toLowerCase().endsWith(".mp4")) {+ return <VideoComponent filePath={extractMP4Path(src)} />;+ }// Convert local file paths to Tauri asset URLsconst imgSrc = src.startsWith("/")? convertFileSrc(src)diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsxindex aec1f66f8..40f462270 100644--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx@@ -154,8 +154,8 @@ EXAMPLES OF GOOD SEARCHES:- User: "what apps did I use today" → call activity-summary with start_time: today_start, end_time: now → report active_minutes per app- User: "what was I reading about X" → search q:"X", start_time:"3h ago" → show text with deep links-Rules for showing videos/audio:-- Show videos by putting .mp4 file paths in inline code blocks: \`/path/to/video.mp4\`+Rules for showing media:+- Show videos/images using standard markdown:  or - ONLY use the exact, unmodified file_path or audio_file_path from search results. NEVER construct or guess paths.- Before showing a video, verify the file exists by checking it with the shell (e.g. ls or Test-Path). If missing, tell the user and retry search with a different time range instead of showing a broken player.@@ -177,7 +177,7 @@ When the user asks for diagrams, flowcharts, or visualizations, generate MermaidDEEP LINKS & MEDIA:- Frame (PREFERRED): [10:30 AM — Chrome](screenpipe://frame/12345) — use frame_id from screen text search results. NEVER invent frame IDs.- Timeline (audio only): [meeting at 3pm](screenpipe://timeline?timestamp=2024-01-15T15:00:00Z) — use exact timestamp from audio search results.-- Video: show .mp4 paths in inline code: \`/path/to/video.mp4\`+- Video/Image: use markdown NEVER fabricate frame IDs or timestamps — only use values from actual search results.Current time: ${now.toISOString()}diff --git a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsxindex 5e5f17aa2..5364e5a35 100644--- a/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx+++ b/apps/screenpipe-app-tauri/lib/hooks/use-settings.tsx@@ -198,7 +198,7 @@ export function getEffectiveFilters(settings: Settings) {}export const DEFAULT_PROMPT = `Rules:-- Videos: use inline code \`/path/to/video.mp4\` (not links or multiline blocks)+- Media: use standard markdown  for videos and  for images- Diagrams: use \`\`\`mermaid blocks for visual summaries (flowchart, gantt, mindmap, graph)- Activity summaries: gantt charts with apps/duration- Workflows: flowcharts showing steps takendiff --git a/apps/screenpipe-app-tauri/src-tauri/src/store.rs b/apps/screenpipe-app-tauri/src-tauri/src/store.rsindex 498bf07ba..dd1d8f813 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/store.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/store.rs@@ -442,9 +442,7 @@ impl Default for SettingsStore {id: "screenpipe-free".to_string(),prompt: r#"IMPORTANT: At the start of every conversation, read the files in .pi/skills/ directory (e.g. .pi/skills/screenpipe-api/SKILL.md and .pi/skills/screenpipe-cli/SKILL.md) before responding.Rules:-- You can analyze/view/show/access videos to the user by putting .mp4 files in a code block (we'll render it) like this: `/users/video.mp4`, use the exact, absolute, file path from file_path property-- Do not try to embed video in links (e.g. [](.mp4) or https://.mp4) instead put the file_path in a code block using backticks-- Do not put video in multiline code block it will not render the video (e.g. ```bash\n.mp4```) instead using inline code block with single backtick+- Media: use standard markdown  for videos and  for images- Always answer my question/intent, do not make up things"#.to_string(),provider: AIProviderType::ScreenpipeCloud,