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

Method loadHistory

apps/desktop/main/ai/agent/index.ts:365–376  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

363 }
364
365 private loadHistory(): SimpleHistoryMessage[] {
366 const { aiChatId } = this.context
367 if (!aiChatId) {
368 return []
369 }
370 try {
371 return getHistoryForAgent(aiChatId, undefined, this.context.historyLeafMessageId)
372 } catch (error) {
373 aiLogger.warn('Agent', 'Failed to load history from DB, using empty history', { aiChatId, error })
374 return []
375 }
376 }
377}
378
379/**

Callers 1

executeStreamMethod · 0.95

Calls 2

getHistoryForAgentFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected