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

Method clear

app/src/AI/Conversation.cpp:313–328  ·  view source on GitHub ↗

* @brief Clears history and UI state. Aborts any in-flight reply. */

Source from the content-addressed store, hash-verified

311 * @brief Clears history and UI state. Aborts any in-flight reply.
312 */
313void AI::Conversation::clear()
314{
315 cancel();
316 m_history = QJsonArray();
317 m_uiMessages.clear();
318 m_assistantIndex = -1;
319 m_assistantText.clear();
320 m_pendingThinkingBlocks = QJsonArray();
321 m_pendingToolUseBlocks = QJsonArray();
322 m_pendingToolResultBlocks = QJsonArray();
323 m_outstandingToolResults = 0;
324 m_awaitingConfirm.clear();
325 setLastError(QString());
326
327 Q_EMIT messagesChanged();
328}
329
330//--------------------------------------------------------------------------------------------------
331// Reply slot handlers

Callers 15

~ZeroOnDestroyMethod · 0.45
startMethod · 0.45
cancelMethod · 0.45
onPartialTextMethod · 0.45
onPartialThinkingMethod · 0.45
onReplyFinishedMethod · 0.45
onReplyErrorMethod · 0.45
beginAssistantMessageMethod · 0.45
loadSnapshotMethod · 0.45
resetMethod · 0.45
clearDroppedPathsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected