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

fix(chat): support removing @input (#3210)

Harsh Kumareb587ba1f0d7
diff --git a/apps/screenpipe-app-tauri/components/hooks/use-mention-system.ts b/apps/screenpipe-app-tauri/components/hooks/use-mention-system.ts
index 31e7b6bc9..0ae59236c 100644
--- a/apps/screenpipe-app-tauri/components/hooks/use-mention-system.ts
+++ b/apps/screenpipe-app-tauri/components/hooks/use-mention-system.ts
@@ -102,7 +102,7 @@ export function useMentionSystem(opts: {
const pattern = timePatterns[label];
if (pattern) newInput = newInput.replace(pattern, "").trim();
} else if (filterType === "content") {
- newInput = newInput.replace(/@(audio|screen)\b/gi, "").trim();
+ newInput = newInput.replace(/@(audio|screen|input)\b/gi, "").trim();
} else if (filterType === "app" && activeFilters.appName) {
// Remove app mention - need to find the pattern
const appPattern = new RegExp(`@${activeFilters.appName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\b`, "gi");
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
index 11fcd3a3c..94b374b71 100644
--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -2255,7 +2255,7 @@ export function StandaloneChat({
const pattern = timePatterns[label];
if (pattern) newInput = newInput.replace(pattern, "").trim();
} else if (filterType === "content") {
- newInput = newInput.replace(/@(audio|screen)\b/gi, "").trim();
+ newInput = newInput.replace(/@(audio|screen|input)\b/gi, "").trim();
} else if (filterType === "app" && activeFilters.appName) {
// Remove app mention - need to find the pattern
const appPattern = new RegExp(`@${activeFilters.appName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\b`, "gi");