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

replace deprecated ui content type with vision and input in chat components

Louis Beaumont6a78dffd4eed
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsx
index ad77863e8..eac65dca8 100644
--- a/screenpipe-app-tauri/components/global-chat.tsx
+++ b/screenpipe-app-tauri/components/global-chat.tsx
@@ -114,7 +114,7 @@ interface TimeRange {
interface ParsedMentions {
cleanedInput: string;
timeRanges: TimeRange[];
- contentType: "all" | "ocr" | "audio" | null;
+ contentType: "all" | "ocr" | "audio" | "vision" | "input" | null;
appName: string | null;
usedSelection: boolean;
speakerName: string | null;
@@ -159,7 +159,7 @@ export function parseMentions(input: string, options?: ParseMentionsOptions): Pa
const now = new Date();
const timeRanges: TimeRange[] = [];
let cleanedInput = input;
- let contentType: "all" | "ocr" | "audio" | null = null;
+ let contentType: "all" | "ocr" | "audio" | "vision" | "input" | null = null;
let appName: string | null = null;
let usedSelection = false;
let speakerName: string | null = null;
@@ -242,13 +242,20 @@ export function parseMentions(input: string, options?: ParseMentionsOptions): Pa
cleanedInput = cleanedInput.replace(audioPattern, "").trim();
}
- // @screen or @ocr - screen text only
- const screenPattern = /@(screen|ocr)\b/gi;
+ // @screen or @ocr or @vision - screen text only
+ const screenPattern = /@(screen|ocr|vision)\b/gi;
if (screenPattern.test(cleanedInput)) {
contentType = "ocr";
cleanedInput = cleanedInput.replace(screenPattern, "").trim();
}
+ // @input or @clicks or @events - UI events (clicks, keystrokes, app switches)
+ const inputPattern = /@(input|clicks|events)\b/gi;
+ if (inputPattern.test(cleanedInput)) {
+ contentType = "input";
+ cleanedInput = cleanedInput.replace(inputPattern, "").trim();
+ }
+
// === APP MENTIONS ===
const appTagMap = options?.appTagMap || {};
@@ -363,6 +370,7 @@ const STATIC_MENTION_SUGGESTIONS: MentionSuggestion[] = [
// Content type
{ tag: "@audio", description: "audio/meetings only", category: "content" },
{ tag: "@screen", description: "screen text only", category: "content" },
+ { tag: "@input", description: "UI events (clicks, keys)", category: "content" },
];
// Speaker interface for dynamic suggestions
@@ -409,8 +417,8 @@ EXAMPLES:
},
content_type: {
type: "string",
- enum: ["all", "ocr", "audio", "ui"],
- description: "Filter by type. Use 'audio' for meetings/conversations, 'ocr' for screen text. Default: 'all'",
+ enum: ["all", "ocr", "audio", "vision", "input"],
+ description: "Filter by type. Use 'audio' for meetings/conversations, 'ocr'/'vision' for screen text, 'input' for UI events (clicks, keystrokes, app switches). Default: 'all'",
},
limit: {
type: "integer",
diff --git a/screenpipe-app-tauri/components/standalone-chat.tsx b/screenpipe-app-tauri/components/standalone-chat.tsx
index 524f7c137..3fe8b077b 100644
--- a/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -56,6 +56,7 @@ const STATIC_MENTION_SUGGESTIONS: MentionSuggestion[] = [
{ tag: "@last-hour", description: "past hour", category: "time" },
{ tag: "@audio", description: "audio/meetings only", category: "content" },
{ tag: "@screen", description: "screen text only", category: "content" },
+ { tag: "@input", description: "UI events (clicks, keys)", category: "content" },
];
const TOOLS: ChatCompletionTool[] = [
@@ -76,7 +77,7 @@ RULES:
type: "object",
properties: {
q: { type: "string", description: "Search keywords. Be specific. Optional but recommended." },
- content_type: { type: "string", enum: ["all", "ocr", "audio", "ui"], description: "Filter by type." },
+ content_type: { type: "string", enum: ["all", "ocr", "audio", "vision", "input"], description: "Filter by type. 'input' for UI events (clicks, keystrokes)." },
limit: { type: "integer", description: "Max results (1-20). Default: 10" },
start_time: { type: "string", description: "ISO 8601 UTC start time. REQUIRED." },
end_time: { type: "string", description: "ISO 8601 UTC end time." },