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

Method importFile

apps/cli/src/sync/adapters.ts:93–104  ·  view source on GitHub ↗
(tempFile: string, targetSessionId: string | undefined, externalId: string)

Source from the content-addressed store, hash-verified

91 }
92
93 async importFile(tempFile: string, targetSessionId: string | undefined, externalId: string): Promise<ImportResult> {
94 if (targetSessionId && this.sessionExists(targetSessionId)) {
95 return this.incrementalImportFile(targetSessionId, tempFile)
96 }
97
98 if (targetSessionId) {
99 this.logger.info(`[DirectImporter] Session ${targetSessionId} not found locally, need full resync`)
100 return { success: false, newMessageCount: 0, needFullResync: true }
101 }
102
103 return this.fullImportFile(tempFile, externalId)
104 }
105
106 private async incrementalImportFile(sessionId: string, tempFile: string): Promise<ImportResult> {
107 try {

Callers

nothing calls this directly

Calls 4

sessionExistsMethod · 0.95
incrementalImportFileMethod · 0.95
fullImportFileMethod · 0.95
infoMethod · 0.65

Tested by

no test coverage detected