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

Method onPartialText

app/src/AI/Conversation.cpp:337–351  ·  view source on GitHub ↗

* @brief Appends streamed text and schedules a coalesced UI refresh. */

Source from the content-addressed store, hash-verified

335 * @brief Appends streamed text and schedules a coalesced UI refresh.
336 */
337void AI::Conversation::onPartialText(const QString& chunk)
338{
339 if (m_cancelled || m_assistantIndex < 0)
340 return;
341
342 if (m_thinkingIsSynthetic && !m_assistantThinking.isEmpty()) {
343 m_assistantThinking.clear();
344 m_thinkingIsSynthetic = false;
345 }
346
347 m_assistantText.append(chunk);
348 m_streamDirty = true;
349 if (!m_streamFlushTimer->isActive())
350 m_streamFlushTimer->start();
351}
352
353/**
354 * @brief Appends streamed thinking text to the live assistant preamble.

Callers

nothing calls this directly

Calls 5

isEmptyMethod · 0.80
clearMethod · 0.45
appendMethod · 0.45
isActiveMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected