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

Method cancelRequest

ChatView/ClientInterface.cpp:428–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

426}
427
428void ClientInterface::cancelRequest()
429{
430 QSet<PluginLLMCore::Provider *> providers;
431 for (auto it = m_activeRequests.begin(); it != m_activeRequests.end(); ++it) {
432 if (it.value().provider) {
433 providers.insert(it.value().provider);
434 }
435 }
436
437 for (auto *provider : providers) {
438 disconnect(provider->client(), nullptr, this, nullptr);
439 }
440
441 for (auto it = m_activeRequests.begin(); it != m_activeRequests.end(); ++it) {
442 const RequestContext &ctx = it.value();
443 if (ctx.provider) {
444 ctx.provider->cancelRequest(it.key());
445 }
446 }
447
448 m_activeRequests.clear();
449 m_accumulatedResponses.clear();
450 m_awaitingContinuation.clear();
451
452 LOG_MESSAGE("All requests cancelled and state cleared");
453}
454
455void ClientInterface::handleLLMResponse(const QString &response, const QJsonObject &request)
456{

Callers

nothing calls this directly

Calls 3

valueMethod · 0.80
clientMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected