knowledgeChunkType derives the file-type tag from the chunk's source path so downstream formatting (code fences, digests) can hint the language.
(source string)
| 146 | // knowledgeChunkType derives the file-type tag from the chunk's source path so |
| 147 | // downstream formatting (code fences, digests) can hint the language. |
| 148 | func knowledgeChunkType(source string) string { |
| 149 | ext := strings.TrimPrefix(strings.ToLower(filepath.Ext(source)), ".") |
| 150 | if ext == "" { |
| 151 | return "text" |
| 152 | } |
| 153 | return ext |
| 154 | } |
| 155 | |
| 156 | // chunkSource recovers the source document path from a chunk's virtual path |
| 157 | // ("docs/intro.md#0001" → "docs/intro.md"). Plain paths pass through, so the |
no outgoing calls
no test coverage detected