MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / loadActiveSnapshot

Method loadActiveSnapshot

app/src/AI/Assistant.cpp:705–715  ·  view source on GitHub ↗

* @brief Loads the active chat's snapshot into the conversation, or clears it when empty. */

Source from the content-addressed store, hash-verified

703 * @brief Loads the active chat's snapshot into the conversation, or clears it when empty.
704 */
705void AI::Assistant::loadActiveSnapshot()
706{
707 if (!m_conversation)
708 return;
709
710 const auto snap = m_chats.loadChat(m_activeChatId);
711 if (snap.isEmpty())
712 m_conversation->clear();
713 else
714 m_conversation->loadSnapshot(snap);
715}
716
717/**
718 * @brief Writes the conversation's current state back to the active chat file.

Callers

nothing calls this directly

Calls 4

loadChatMethod · 0.80
isEmptyMethod · 0.80
loadSnapshotMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected