Render toolkit documentation chunks consistently#1068
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 90aab58. Configure here.
Share chunk ordering between rendered pages and copied Markdown so custom toolkit guidance remains complete and predictably placed. Co-authored-by: Cursor <cursoragent@cursor.com>
Make copied Markdown apply before, replace, and after description chunks in the same order as rendered toolkit pages. Co-authored-by: Cursor <cursoragent@cursor.com>
Apply replacement chunks consistently across exported toolkit sections so Markdown matches the rendered page ordering and content. Co-authored-by: Cursor <cursoragent@cursor.com>
Keep Markdown export available when an invalid chunk lacks content instead of failing the whole copy operation. Co-authored-by: Cursor <cursoragent@cursor.com>
Render after-available-tools documentation only after the complete tool list in copied Markdown. Co-authored-by: Cursor <cursoragent@cursor.com>
a330634 to
d166368
Compare
|
Current version of PR was reviewed by /review-bugbot on Jul 16, 15:51 GMT-3. It flagged 1 finding. Show 1 finding1. Chunk headers omitted from markdown
Bugbot on commit |

Summary
Test plan
pnpm exec vitest run tests/documentation-chunks.test.ts tests/toolkit-markdown.test.tsNote
Low Risk
Documentation serialization and refactor only; no auth, API, or data-path changes.
Overview
Centralizes documentation-chunk ordering in
sortDocumentationChunksand wires the page renderer’ssortChunksDeterministicallyexport to that shared helper so UI and exports use the same priority → header → content ordering.Extends
toToolkitMarkdownso copied/agent markdown includes toolkit- and tool-leveldocumentationChunksat the same injection points as the live docs:before/replace/afterper location (description, parameters, auth, header, footer, etc.).replacechunks override default sections (e.g. custom parameters text instead of the table); whitespace-only replacements still suppress the default block.Tests cover sorting edge cases, chunk placement, replacement behavior, and repeated content across locations.
Reviewed by Cursor Bugbot for commit 90aab58. Bugbot is set up for automated code reviews on this repo. Configure here.