Kind: Class
Source: atloria-monorepo/libs/agent-core/src/semantic/chunker.ts
Methods
| Method | Signature | Returns |
|---|---|---|
chunkFile | chunkFile(filePath: string, rootDir: string) | CodeChunk[] |
chunkDirectory | `chunkDirectory(rootDir: string, config: { |
maxFiles?: number; includeExtensions?: string[]; excludeDirs?: string[]; targetChunkTokens?: number; })` | `CodeChunk[]` |
| extractImports | extractImports(content: string) | string |
Where it refuses work
Chunkerstops the work with an early return whenresults.length >= maxFiles, in 2 places.Chunkerstops the work with an early return whenstat.size > MAX_FILE_SIZE.Chunkerstops the work with an early return whencontent.length > MAX_FILE_SIZE.Chunkerstops the work with an early return whenboundaries.length === 0.Chunkerstops the work with an early return whenfoundOpen && depth === 0.Chunkerstops the work with an early return whenlines[i].trimEnd().endsWith(';').
When something fails
Chunkerhandles failure in 2 places: it turns it into a return value in all 2.
Was this page helpful?