(locale: string, onProgress?: (p: DemoProgress) => void)
| 119 | } |
| 120 | |
| 121 | async importDemo(locale: string, onProgress?: (p: DemoProgress) => void): Promise<DemoImportResult> { |
| 122 | const unlisten = window.chatApi.onDemoProgress((progress: any) => { |
| 123 | if (progress.stage === 'downloading' || progress.stage === 'importing') { |
| 124 | onProgress?.({ stage: progress.stage }) |
| 125 | } |
| 126 | }) |
| 127 | |
| 128 | try { |
| 129 | const result = await window.chatApi.importDemo(locale) |
| 130 | return result |
| 131 | } finally { |
| 132 | unlisten() |
| 133 | } |
| 134 | } |
| 135 | |
| 136 | async analyzeIncrementalImport(sessionId: string, file: File | string): Promise<IncrementalAnalysis> { |
| 137 | const filePath = resolveFilePath(file) |
nothing calls this directly
no test coverage detected