fix(feishu): paginate drive file list and info actions#94026
Closed
bladin wants to merge 1 commit into
Closed
Conversation
Drive file list/info actions ignored has_more/next_page_token cursors from the Lark drive.file.list API, causing false File not found errors for any file beyond the first page and making pages 2+ unreachable. - listFolder now accepts pageSize/pageToken and returns has_more - getFileInfo now drains has_more/next_page_token pages until found - drive-schema.ts adds page_size/page_token to list action - 5 new test cases covering pagination scenarios Fixes openclaw#93928
This was referenced Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
Feishu drive
listandinfoactions now support pagination:listFolderacceptspage_sizeandpage_tokenparameters, passes them toclient.drive.file.list, and returnshas_morealongsidenext_page_tokenso callers can page through the entire folder.getFileInfofollowshas_more/next_page_tokenpagination loops instead of searching only the first page and throwingFile not foundfor files that live beyond page 1.drive-schema.tsaddspage_sizeandpage_tokento thelistaction schema (matching the wiki schema pattern), so the LLM can request subsequent pages.Why
Issue #93928 reports that
feishu_driveinfofalsely returnsFile not foundfor files past the first API page, andlistcannot retrieve any page after the first. Both surfaces ignore thehas_more/next_page_tokencursor the Lark API returns. This is the direct sibling of the wiki pagination fix (#37626), which paginatedwiki.spaceNode.list/wiki.space.listbut did not touch drive. The comment paths in the same plugin already paginate correctly (list_comments,list_comment_repliesexposepage_size+page_token).Real behavior proof
Before fix
After fix
Evidence type: Terminal output (vitest run)
Setup: OpenClaw checkout at commit 87bdaef, Node.js v22.22.0, Linux x64
Fixes #93928