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

Method scanMultiChatFile

src/services/import/fetch.ts:92–100  ·  view source on GitHub ↗
(file: File | string)

Source from the content-addressed store, hash-verified

90 }
91
92 async scanMultiChatFile(file: File | string): Promise<MultiChatEntry[]> {
93 if (typeof file === 'string') return []
94 const form = new FormData()
95 form.append('file', file)
96 const res = await fetchWithAuth(`${getBaseUrl()}/scan-multi-chat`, { method: 'POST', body: form })
97 if (!res.ok) return []
98 const data = (await res.json()) as { chats: MultiChatEntry[] }
99 return data.chats
100 }
101
102 async prepareImportSource(file: File | string): Promise<PreparedImportSourceResult> {
103 if (typeof file === 'string') {

Callers

nothing calls this directly

Calls 2

fetchWithAuthFunction · 0.90
getBaseUrlFunction · 0.90

Tested by

no test coverage detected