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

Method importDemo

src/services/import/electron.ts:121–134  ·  view source on GitHub ↗
(locale: string, onProgress?: (p: DemoProgress) => void)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

importDemoMethod · 0.65
onProgressFunction · 0.50

Tested by

no test coverage detected