Add error handlers to Chroma sync operations to prevent worker crashes on timeout (#428)

* Initial plan

* Add .catch() handlers to Chroma sync operations to prevent worker crashes

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>

* Add .catch() handler to syncUserPrompt to prevent crashes

Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>

* Update mem-search plugin with new features and improvements

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: thedotmack <683968+thedotmack@users.noreply.github.com>
Co-authored-by: Alex Newman <thedotmack@gmail.com>
This commit is contained in:
Copilot
2025-12-23 20:46:48 -05:00
committed by GitHub
parent 8bca13a9ad
commit 0cbcbd970a
3 changed files with 59 additions and 43 deletions
+11
View File
@@ -300,6 +300,12 @@ export class SDKAgent {
type: obsType,
title: obsTitle
});
}).catch((error) => {
logger.warn('CHROMA', 'Observation sync failed, continuing without vector search', {
obsId,
type: obsType,
title: obsTitle
}, error);
});
// Broadcast to SSE clients (for web UI)
@@ -367,6 +373,11 @@ export class SDKAgent {
duration: `${chromaDuration}ms`,
request: summaryRequest
});
}).catch((error) => {
logger.warn('CHROMA', 'Summary sync failed, continuing without vector search', {
summaryId,
request: summaryRequest
}, error);
});
// Broadcast to SSE clients (for web UI)
@@ -119,6 +119,11 @@ export class SessionRoutes extends BaseRouteHandler {
duration: `${chromaDuration}ms`,
prompt: truncatedPrompt
});
}).catch((error) => {
logger.warn('CHROMA', 'User prompt sync failed, continuing without vector search', {
promptId: latestPrompt.id,
prompt: promptText.length > 60 ? promptText.substring(0, 60) + '...' : promptText
}, error);
});
}