Skip to content

feat: add cursor-based listSession for lazy fetching - #141

Open
EugeneTheDev wants to merge 1 commit into
masterfrom
eugenethedev/session-list-pagination
Open

EugeneTheDev wants to merge 1 commit into
masterfrom
eugenethedev/session-list-pagination

Conversation

@EugeneTheDev

Copy link
Copy Markdown
Collaborator

Problem

Agent registers session/list via setPaginatedRequestHandler:

That handler requires the agent to return Sequence<SessionInfo> — a non-suspend iterator. An agent whose data source is a database cannot do lazy per-page fetches and must materialize the entire list on the first request.

Solution

Add suspendable AgentSupport.listSession with cursor so that a DB-backed agent can lazily fetch one page at a time instead of materializing the whole session list up front.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant