Files
sim/apps/docs/lib/llms.ts
Waleed 79bb4e5ad8 feat(docs): add API reference with OpenAPI spec and auto-generated endpoint pages (#3388)
* feat(docs): add API reference with OpenAPI spec and auto-generated endpoint pages

* multiline curl

* random improvements

* cleanup

* update docs copy

* fix build

* cast

* fix builg

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Lakee Sivaraya <71339072+lakeesiv@users.noreply.github.com>
Co-authored-by: Vikhyath Mondreti <vikhyath@simstudio.ai>
Co-authored-by: Vikhyath Mondreti <vikhyathvikku@gmail.com>
2026-03-01 22:53:18 -08:00

12 lines
392 B
TypeScript

import type { InferPageType } from 'fumadocs-core/source'
import type { PageData, source } from '@/lib/source'
export async function getLLMText(page: InferPageType<typeof source>) {
const data = page.data as unknown as PageData
if (typeof data.getText !== 'function') return ''
const processed = await data.getText('processed')
return `# ${data.title} (${page.url})
${processed}`
}