MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / detectFormat

Function detectFormat

packages/parser/src/index.ts:37–39  ·  view source on GitHub ↗
(filePath: string)

Source from the content-addressed store, hash-verified

35 * @returns 格式特征,如果无法识别则返回 null
36 */
37export function detectFormat(filePath: string): FormatFeature | null {
38 return sniffer.sniff(filePath)
39}
40
41/**
42 * 检测所有匹配的文件格式(按优先级排序)

Callers 10

parseGoogleChatFixtureFunction · 0.90
parseFixtureFunction · 0.90
analyzeNewImportFunction · 0.90
streamParseFileInfoFunction · 0.90
analyzeIncrementalImportFunction · 0.90
incrementalImportFunction · 0.90
registerChatHandlersFunction · 0.90
walkFunction · 0.85
cli.tsFile · 0.85
registerImportRoutesFunction · 0.85

Calls 1

sniffMethod · 0.80

Tested by 2

parseGoogleChatFixtureFunction · 0.72
parseFixtureFunction · 0.72