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(docs): remove pipes reference from getting-started

Louis Beaumont189a8bff0821
diff --git a/content/docs-mintlify-mig-tmp/getting-started.mdx b/content/docs-mintlify-mig-tmp/getting-started.mdx
index cddd55627..b0193be95 100644
--- a/content/docs-mintlify-mig-tmp/getting-started.mdx
+++ b/content/docs-mintlify-mig-tmp/getting-started.mdx
@@ -74,7 +74,7 @@ async function queryScreenpipe() {
queryScreenpipe().catch(console.error);
```
-now download the [desktop app](https://screenpi.pe) and use pipes (plugins) to add more features\!
+now download the [desktop app](https://screenpi.pe) to start capturing your screen and audio!
### connect to ai providers
diff --git a/screenpipe-app-tauri/components/global-chat.tsx b/screenpipe-app-tauri/components/global-chat.tsx
index c4fb04518..d714e68fd 100644
--- a/screenpipe-app-tauri/components/global-chat.tsx
+++ b/screenpipe-app-tauri/components/global-chat.tsx
@@ -1113,6 +1113,8 @@ export function GlobalChat() {
let accumulatedText = "";
let toolCalls: any[] = [];
+ let streamCompleted = false;
+ let lastChunkTime = Date.now();
// First request with streaming
const stream = await openai.chat.completions.create(
@@ -1125,8 +1127,18 @@ export function GlobalChat() {
{ signal: abortControllerRef.current.signal }
);
+ // Stream timeout - 60 seconds without receiving a chunk
+ const STREAM_TIMEOUT_MS = 60000;
+
for await (const chunk of stream) {
+ lastChunkTime = Date.now();
const delta = chunk.choices[0]?.delta;
+ const finishReason = chunk.choices[0]?.finish_reason;
+
+ // Track stream completion
+ if (finishReason) {
+ streamCompleted = true;
+ }
// Handle text content
if (delta?.content) {
@@ -1157,6 +1169,20 @@ export function GlobalChat() {
}
}
+ // Check for incomplete stream (no finish_reason and no tool calls)
+ if (!streamCompleted && toolCalls.length === 0 && accumulatedText) {
+ console.warn("Stream ended without finish_reason - possible connection issue");
+ // Append a note that the response may be incomplete
+ accumulatedText += "\n\n*(Response may be incomplete due to connection issue)*";
+ setMessages((prev) =>
+ prev.map((m) =>
+ m.id === assistantMessageId
+ ? { ...m, content: accumulatedText }
+ : m
+ )
+ );
+ }
+
// Handle tool calls if any
if (toolCalls.length > 0) {
// Show what we're searching for
@@ -1219,6 +1245,7 @@ export function GlobalChat() {
// Continue conversation with tool results
accumulatedText = "";
+ streamCompleted = false;
const continueStream = await openai.chat.completions.create(
{
model: activePreset.model || "gpt-4",
@@ -1230,6 +1257,12 @@ export function GlobalChat() {
for await (const chunk of continueStream) {
const content = chunk.choices[0]?.delta?.content;
+ const finishReason = chunk.choices[0]?.finish_reason;
+
+ if (finishReason) {
+ streamCompleted = true;
+ }
+
if (content) {
accumulatedText += content;
setMessages((prev) =>
@@ -1241,6 +1274,19 @@ export function GlobalChat() {
);
}
}
+
+ // Check for incomplete continuation stream
+ if (!streamCompleted && accumulatedText) {
+ console.warn("Continuation stream ended without finish_reason");
+ accumulatedText += "\n\n*(Response may be incomplete due to connection issue)*";
+ setMessages((prev) =>
+ prev.map((m) =>
+ m.id === assistantMessageId
+ ? { ...m, content: accumulatedText }
+ : m
+ )
+ );
+ }
}
// Final update if no content was streamed
@@ -1281,8 +1327,14 @@ export function GlobalChat() {
errorMessage = "Invalid API key. Please check your preset configuration.";
} else if (errorMessage.includes("429")) {
errorMessage = "Rate limit exceeded. Please wait a moment and try again.";
- } else if (errorMessage.includes("Failed to fetch") || errorMessage.includes("NetworkError")) {
- errorMessage = "Network error. Please check your internet connection and that the API endpoint is correct.";
+ } else if (
+ errorMessage.includes("Failed to fetch") ||
+ errorMessage.includes("NetworkError") ||
+ errorMessage.includes("network") ||
+ errorMessage.includes("ECONNRESET") ||
+ errorMessage.includes("stream")
+ ) {
+ errorMessage = "Connection error. The AI response was interrupted. Please try again.";
} else if (
errorMessage.includes("context") ||
errorMessage.includes("token") ||
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.toml
index db8212902..0c9e1b618 100644
--- a/screenpipe-app-tauri/src-tauri/Cargo.toml
+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "screenpipe-app"
-version = "2.0.115"
+version = "2.0.116"
description = "24/7 memory for your desktop. 100% local."
authors = ["you"]
license = ""