fix(client): honor page_size in get_all when page is not passed (#6900)

This commit is contained in:
Kartik
2026-08-14 16:49:58 +05:30
committed by GitHub
parent a133287015
commit bfb51c6b93
4 changed files with 206 additions and 14 deletions
+4 -4
View File
@@ -404,10 +404,10 @@ export default class MemoryClient {
...(filters && { filters }),
};
let url = `${this.host}/v3/memories/`;
if (page && pageSize) {
url += `?page=${page}&page_size=${pageSize}`;
}
const queryParams: string[] = [];
if (page !== undefined) queryParams.push(`page=${page}`);
if (pageSize !== undefined) queryParams.push(`page_size=${pageSize}`);
const url = `${this.host}/v3/memories/${queryParams.length ? `?${queryParams.join("&")}` : ""}`;
const response = await this._fetchWithErrorHandling(url, {
method: "POST",