()
| 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 | /** |
no test coverage detected