fix: restore v3 search response format — return {results: [...]} not bare array
The v3 API returns {results: [...]} and the client should pass that
through without unwrapping. Updated return type to Promise<{results: Array<Memory>}>,
removed the unwrap logic, and fixed integration tests to access .results.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
0aa0f44ac4
commit
2da2ded2d8
@@ -92,7 +92,8 @@ export async function waitForSearchResults(
|
||||
maxRetries = 4,
|
||||
): Promise<Memory[]> {
|
||||
for (let attempt = 1; attempt <= maxRetries; attempt++) {
|
||||
const results = await withRetry(() => client.search(query, options));
|
||||
const response = await withRetry(() => client.search(query, options));
|
||||
const results = response?.results ?? [];
|
||||
if (results.length > 0) {
|
||||
return results;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user