fix(server): close the memory recall step when nothing is found or recall fails (UF-051)
Only a successful recall reported its outcome, so an empty or failed recall left "Recalling relevant memories..." as the last step after the answer. Both cases now send a closing step and the turn goes on.
This commit is contained in:
@@ -1892,11 +1892,16 @@ ${wsConfig?.templateId ? `- Workspace template: ${wsConfig.templateId} — tailo
|
||||
});
|
||||
sendEvent('tool_result', { name: 'auto_recall', result: resultText, duration: recallDuration, isError: false });
|
||||
} else {
|
||||
// UF-051: close the "Recalling…" step with its outcome, or it
|
||||
// reads as still running after the answer lands.
|
||||
sendEvent('step', { content: 'No relevant memories found.' });
|
||||
sendEvent('tool_result', { name: 'auto_recall', result: 'No relevant memories found', duration: recallDuration, isError: false });
|
||||
}
|
||||
} catch {
|
||||
throwIfTurnAborted();
|
||||
// Non-blocking — if recall fails, continue without it
|
||||
// Non-blocking — if recall fails, continue without it, and say so.
|
||||
sendEvent('step', { content: 'Could not search memory. Continuing without it.' });
|
||||
sendEvent('tool_result', { name: 'auto_recall', result: 'Memory search failed', isError: true });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user