[PR #4384] [MERGED] fix: resolve llms.txt missing wrapped component examples #13597

Closed
opened 2026-04-13 09:01:20 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4384
Author: @Kinfe123
Created: 9/3/2025
Status: Merged
Merged: 9/3/2025
Merged by: @himself65

Base: canaryHead: fix/llms-txt-expose-client-server-methods


📝 Commits (2)

  • 0892c02 fix: expose both client and server methods in llms.txt generation
  • 2dde2f1 lint

📊 Changes

1 file changed (+248 additions, -1 deletions)

View changed files

📝 docs/app/docs/lib/get-llm-text.ts (+248 -1)

📄 Description

closes #4365 and more others edgecases
This pr fixes an issue of llm.txt on handling the case of wrapped component becasuse how the markdown exports works by default.

before
Screenshot 2025-09-03 at 3 17 24 PM
after
Screenshot 2025-09-03 at 3 13 49 PM


Summary by cubic

Fixes llms.txt generation for wrapped MDX components by extracting APIMethod blocks before remark processing. Client and server examples (and types) now render correctly instead of being dropped.

  • Bug Fixes
    • Added APIMethod parser to generate client, server, and type code blocks from attributes and type definitions.
    • Handles flags: requireSession, isServerOnly, isClientOnly, noResult, resultVariable, forceAsBody, forceAsQuery; converts paths to dot notation for client calls.
    • Pre-processes raw MDX with extractAPIMethods before remark, restoring missing examples for wrapped components.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/4384 **Author:** [@Kinfe123](https://github.com/Kinfe123) **Created:** 9/3/2025 **Status:** ✅ Merged **Merged:** 9/3/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/llms-txt-expose-client-server-methods` --- ### 📝 Commits (2) - [`0892c02`](https://github.com/better-auth/better-auth/commit/0892c0204eb5743f206b1ca098618d5ef85f8ac4) fix: expose both client and server methods in llms.txt generation - [`2dde2f1`](https://github.com/better-auth/better-auth/commit/2dde2f1b4a4c043fa5354c0811b7a166a1d6b17d) lint ### 📊 Changes **1 file changed** (+248 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/app/docs/lib/get-llm-text.ts` (+248 -1) </details> ### 📄 Description closes #4365 and more others edgecases This pr fixes an issue of llm.txt on handling the case of wrapped component becasuse how the markdown exports works by default. before <img width="1170" height="625" alt="Screenshot 2025-09-03 at 3 17 24 PM" src="https://github.com/user-attachments/assets/6dbf945e-9ba5-4d18-8afd-397e7058e5a6" /> after <img width="1162" height="913" alt="Screenshot 2025-09-03 at 3 13 49 PM" src="https://github.com/user-attachments/assets/cd2bb506-3797-47a8-b13f-2a178a18d702" /> <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Fixes llms.txt generation for wrapped MDX components by extracting APIMethod blocks before remark processing. Client and server examples (and types) now render correctly instead of being dropped. - **Bug Fixes** - Added APIMethod parser to generate client, server, and type code blocks from attributes and type definitions. - Handles flags: requireSession, isServerOnly, isClientOnly, noResult, resultVariable, forceAsBody, forceAsQuery; converts paths to dot notation for client calls. - Pre-processes raw MDX with extractAPIMethods before remark, restoring missing examples for wrapped components. <!-- End of auto-generated description by cubic. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 09:01:20 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#13597