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): show "Try again" button when model returns empty response

Louis Beaumontca5ef297ecb7
diff --git a/apps/screenpipe-app-tauri/components/standalone-chat.tsx b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
index 96d1fd628..3e4aaea01 100644
--- a/apps/screenpipe-app-tauri/components/standalone-chat.tsx
+++ b/apps/screenpipe-app-tauri/components/standalone-chat.tsx
@@ -2301,6 +2301,7 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
const contentBlocks = [...blocksSnapshot];
// If no text content but we have tool/thinking blocks, don't show "no response"
const hasNonTextBlocks = contentBlocks.some((b) => b.type === "tool" || b.type === "thinking");
+ let emptyResponseRetryPrompt: string | undefined;
if (!content && hasNonTextBlocks) {
content = ""; // empty — tool/thinking blocks will render
} else if (!content) {
@@ -2310,13 +2311,16 @@ export function StandaloneChat({ className }: { className?: string } = {}) {
} else {
content = "No response from model — try again or check your AI preset in settings.";
}
+ emptyResponseRetryPrompt = lastUserMessageRef.current || undefined;
}
// Add text as a content block if no text block exists yet
const hasTextBlock = contentBlocks.some((b) => b.type === "text");
if (!streamedText && content && !hasTextBlock) {
contentBlocks.push({ type: "text", text: content });
}
- return prev.map((m) => m.id === msgId ? { ...m, content, contentBlocks } : m);
+ return prev.map((m) => m.id === msgId
+ ? { ...m, content, contentBlocks, ...(emptyResponseRetryPrompt ? { retryPrompt: emptyResponseRetryPrompt } : {}) }
+ : m);
});
if (!isPipeWatch) {