(file: File | string)
| 80 | } |
| 81 | |
| 82 | async detectFormat(file: File | string): Promise<FormatInfo | null> { |
| 83 | if (typeof file === 'string') return null |
| 84 | const form = new FormData() |
| 85 | form.append('file', file) |
| 86 | const res = await fetchWithAuth(`${getBaseUrl()}/detect-format`, { method: 'POST', body: form }) |
| 87 | if (!res.ok) return null |
| 88 | const data = (await res.json()) as { format: FormatInfo | null } |
| 89 | return data.format |
| 90 | } |
| 91 | |
| 92 | async scanMultiChatFile(file: File | string): Promise<MultiChatEntry[]> { |
| 93 | if (typeof file === 'string') return [] |
nothing calls this directly
no test coverage detected