MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / isKnowledgeFile

Function isKnowledgeFile

common/src/constants/knowledge.ts:32–46  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

30 * - Pattern: *.knowledge.md (e.g., authentication.knowledge.md)
31 */
32export function isKnowledgeFile(filePath: string): boolean {
33 const fileName = path.basename(filePath).toLowerCase()
34
35 // Check for exact matches with standard knowledge file names
36 if (KNOWLEDGE_FILE_NAMES_LOWERCASE.includes(fileName)) {
37 return true
38 }
39
40 // Check for *.knowledge.md pattern (e.g., authentication.knowledge.md)
41 if (fileName.endsWith('.knowledge.md')) {
42 return true
43 }
44
45 return false
46}

Calls

no outgoing calls

Tested by

no test coverage detected