MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / loadHistory

Method loadHistory

ChatView/ChatRootView.cpp:555–582  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

553}
554
555void ChatRootView::loadHistory(const QString &filePath)
556{
557 if (filePath != m_recentFilePath) {
558 if (auto registry = sessionFileRegistry(); registry && registry->isLocked(filePath)) {
559 m_lastErrorMessage
560 = tr("This chat is already open in another QodeAssist chat session.");
561 emit lastErrorMessageChanged();
562 return;
563 }
564 }
565
566 auto result = m_historyStore->load(filePath);
567 if (!result.success) {
568 LOG_MESSAGE(QString("Failed to load chat history: %1").arg(result.errorMessage));
569 } else {
570 setRecentFilePath(filePath);
571 }
572
573 if (!m_pendingSend.active)
574 m_fileManager->clearIntermediateStorage();
575 m_attachmentFiles.clear();
576 m_linkedFiles.clear();
577 emit attachmentFilesChanged();
578 emit linkedFilesChanged();
579
580 m_fileEditController->clearCurrentRequestId();
581 updateInputTokensCount();
582}
583
584void ChatRootView::showSaveDialog()
585{

Callers

nothing calls this directly

Calls 5

isLockedMethod · 0.80
clearCurrentRequestIdMethod · 0.80
loadMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected