MCPcopy Create free account
hub / github.com/experdot/pointer / parseImportFile

Function parseImportFile

src/renderer/src/services/importers/index.ts:33–48  ·  view source on GitHub ↗
(data: unknown)

Source from the content-addressed store, hash-verified

31 * 自动检测格式并解析
32 */
33export function parseImportFile(data: unknown): {
34 importer: ConversationImporter
35 conversations: ParsedConversation[]
36} | null {
37 const importer = detectImporter(data)
38 if (!importer) return null
39
40 try {
41 return {
42 importer,
43 conversations: importer.parse(data)
44 }
45 } catch {
46 return null
47 }
48}
49
50/**
51 * 获取支持的平台列表(用于 UI 显示)

Callers 1

handleFileUploadFunction · 0.90

Calls 2

detectImporterFunction · 0.85
parseMethod · 0.65

Tested by

no test coverage detected