mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
feat(tools): added sentry, incidentio, and posthog tools (#2116)
* feat(tools): added sentry, incidentio, and posthog tools * update docs * fixed docs to use native fumadocs for llms.txt and copy markdown, fixed tool issues * cleanup * enhance error extractor, fixed posthog tools * docs enhancements, cleanup * added more incident io ops, remove zustand/shallow in favor of zustand/react/shallow * fix type errors * remove unnecessary comments * added vllm to docs
This commit is contained in:
1
apps/docs/lib/cn.ts
Normal file
1
apps/docs/lib/cn.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { twMerge as cn } from 'tailwind-merge'
|
||||
@@ -1,38 +1,10 @@
|
||||
import type { InferPageType } from 'fumadocs-core/source'
|
||||
import { remarkInclude } from 'fumadocs-mdx/config'
|
||||
import { remark } from 'remark'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import remarkMdx from 'remark-mdx'
|
||||
import type { source } from '@/lib/source'
|
||||
|
||||
const processor = remark().use(remarkMdx).use(remarkInclude).use(remarkGfm)
|
||||
|
||||
export async function getLLMText(page: InferPageType<typeof source>) {
|
||||
// Skip pages without proper file data
|
||||
if (!page?.data?._file?.absolutePath || !page?.data?.content) {
|
||||
return `# ${page.data.title || 'Untitled'}
|
||||
URL: ${page.url || 'Unknown'}
|
||||
|
||||
${page.data.description || 'No description available'}`
|
||||
}
|
||||
|
||||
try {
|
||||
const processed = await processor.process({
|
||||
path: page.data._file.absolutePath,
|
||||
value: page.data.content,
|
||||
})
|
||||
|
||||
return `# ${page.data.title || 'Untitled'}
|
||||
URL: ${page.url || 'Unknown'}
|
||||
return `# ${page.data.title} (${page.url})
|
||||
|
||||
${page.data.description || ''}
|
||||
|
||||
${processed.value}`
|
||||
} catch (error) {
|
||||
console.error(`Error processing page ${page.url}:`, error)
|
||||
return `# ${page.data.title || 'Untitled'}
|
||||
URL: ${page.url || 'Unknown'}
|
||||
|
||||
${page.data.description || 'No description available'}`
|
||||
}
|
||||
${page.data.content || ''}`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user