MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / fullImportFile

Method fullImportFile

apps/desktop/main/api/adapters.ts:142–152  ·  view source on GitHub ↗
(tempFile: string, externalId: string)

Source from the content-addressed store, hash-verified

140 }
141
142 private async fullImportFile(tempFile: string, externalId: string): Promise<ImportResult> {
143 this.logger.info(`[Pull] First import via streamImport (externalId=${externalId})`)
144 const result = await worker.streamImport(tempFile, undefined, undefined, externalId)
145 if (result.success) {
146 const msgCount = result.diagnostics?.messagesWritten ?? 0
147 this.logger.info(`[Pull] streamImport OK: session=${result.sessionId}, messages=${msgCount}`)
148 return { success: true, newMessageCount: msgCount, sessionId: result.sessionId }
149 }
150 this.logger.error(`[Pull] streamImport failed: ${result.error}`)
151 return { success: false, newMessageCount: 0, error: result.error }
152 }
153}
154
155// ==================== BrowserWindowNotifier ====================

Callers 1

importFileMethod · 0.95

Calls 2

infoMethod · 0.65
errorMethod · 0.65

Tested by

no test coverage detected