diff --git a/packages/ui/src/App.tsx b/packages/ui/src/App.tsx index bb2689cf..866a896b 100644 --- a/packages/ui/src/App.tsx +++ b/packages/ui/src/App.tsx @@ -47,7 +47,6 @@ import { clearActiveParentSession, createSession, fetchSessions, - getSessionFetchLimit, updateSessionAgent, updateSessionModel, } from "./stores/sessions" @@ -419,7 +418,7 @@ const App: Component = () => { clearActiveParentSession(instanceId) try { - await fetchSessions(instanceId, { reset: true, limit: getSessionFetchLimit(instanceId) }) + await fetchSessions(instanceId, { reset: true }) } catch (error) { log.error("Failed to refresh sessions after closing", error) } diff --git a/packages/ui/src/stores/session-api.ts b/packages/ui/src/stores/session-api.ts index e35492e6..98ea2065 100644 --- a/packages/ui/src/stores/session-api.ts +++ b/packages/ui/src/stores/session-api.ts @@ -191,7 +191,7 @@ async function ensureV2ParentChainsLoaded(instanceId: string, apiSessions: SDKSe }) } -async function fetchSessions(instanceId: string, options?: { limit?: number; reset?: boolean }): Promise { +async function fetchSessions(instanceId: string, options?: { reset?: boolean }): Promise { const instance = instances().get(instanceId) if (!instance || !instance.client) { throw new Error("Instance not ready") diff --git a/packages/ui/src/stores/session-state.ts b/packages/ui/src/stores/session-state.ts index 5bca9e95..eb9cf36a 100644 --- a/packages/ui/src/stores/session-state.ts +++ b/packages/ui/src/stores/session-state.ts @@ -85,10 +85,6 @@ function getSessionListIds(instanceId: string): string[] { return getSessionPaginationState(instanceId).ids } -function getSessionFetchLimit(instanceId: string): number { - return Math.max(getSessionPaginationState(instanceId).ids.length, SESSION_PAGE_SIZE) -} - function getSessionNextCursor(instanceId: string): string | undefined { return getSessionPaginationState(instanceId).nextCursor } @@ -1070,7 +1066,6 @@ export { sessionPagination, sessionSearch, getSessionListIds, - getSessionFetchLimit, getSessionNextCursor, setSessionPage, getSessionHasMore, diff --git a/packages/ui/src/stores/sessions.ts b/packages/ui/src/stores/sessions.ts index 365fa8c3..a4239318 100644 --- a/packages/ui/src/stores/sessions.ts +++ b/packages/ui/src/stores/sessions.ts @@ -43,7 +43,6 @@ import { setSessionStatus, toggleSessionParentExpanded, clearSessionSearch, - getSessionFetchLimit, getSessionHasMore, isSessionSearchLoading, resetSessionPagination, @@ -161,7 +160,6 @@ export { updateSessionAgent, updateSessionModel, clearSessionSearch, - getSessionFetchLimit, getSessionHasMore, isSessionSearchLoading, resetSessionPagination,