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

Method handleFullResponse

ChatView/ClientInterface.cpp:529–556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

527}
528
529void ClientInterface::handleFullResponse(const QString &requestId, const QString &fullText)
530{
531 auto it = m_activeRequests.find(requestId);
532 if (it == m_activeRequests.end())
533 return;
534
535 const RequestContext &ctx = it.value();
536
537 QString finalText = !fullText.isEmpty() ? fullText : m_accumulatedResponses[requestId];
538
539 QString applyError;
540 bool applySuccess
541 = Context::ChangesManager::instance().applyPendingEditsForRequest(requestId, &applyError);
542
543 if (!applySuccess) {
544 LOG_MESSAGE(QString("Some edits for request %1 were not auto-applied: %2")
545 .arg(requestId, applyError));
546 }
547
548 LOG_MESSAGE(
549 "Message completed. Final response for message " + ctx.originalRequest["id"].toString()
550 + ": " + finalText);
551 emit messageReceivedCompletely();
552
553 m_activeRequests.erase(it);
554 m_accumulatedResponses.remove(requestId);
555 m_awaitingContinuation.remove(requestId);
556}
557
558void ClientInterface::handleRequestFinalized(
559 const ::LLMQore::RequestID &requestId, const ::LLMQore::CompletionInfo &info)

Callers

nothing calls this directly

Calls 4

valueMethod · 0.80
isEmptyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected