MCPcopy Create free account
hub / github.com/simstudioai/sim / findMdxFiles

Method findMdxFiles

apps/sim/lib/chunkers/docs-chunker.ts:114–131  ·  view source on GitHub ↗
(dirPath: string)

Source from the content-addressed store, hash-verified

112 }
113
114 private async findMdxFiles(dirPath: string): Promise<string[]> {
115 const files: string[] = []
116
117 const entries = await fs.readdir(dirPath, { withFileTypes: true })
118
119 for (const entry of entries) {
120 const fullPath = path.join(dirPath, entry.name)
121
122 if (entry.isDirectory()) {
123 const subFiles = await this.findMdxFiles(fullPath)
124 files.push(...subFiles)
125 } else if (entry.isFile() && entry.name.endsWith('.mdx')) {
126 files.push(fullPath)
127 }
128 }
129
130 return files
131 }
132
133 private extractHeaders(content: string): HeaderInfo[] {
134 const headers: HeaderInfo[] = []

Callers 1

chunkAllDocsMethod · 0.95

Calls 2

joinMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected