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

Method onReplyReadyRead

app/src/AI/Providers/AnthropicReply.cpp:320–330  ·  view source on GitHub ↗

* @brief Forwards every chunk from the network reply into the SSE reader. */

Source from the content-addressed store, hash-verified

318 * @brief Forwards every chunk from the network reply into the SSE reader.
319 */
320void AI::AnthropicReply::onReplyReadyRead()
321{
322 if (!m_reply || m_finished)
323 return;
324
325 const auto status = m_reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt();
326 if (status >= 400)
327 return;
328
329 m_sse->feed(m_reply->readAll());
330}
331
332/**
333 * @brief Handles end-of-stream cleanup and surfaces 4xx/5xx error bodies.

Callers

nothing calls this directly

Calls 1

feedMethod · 0.80

Tested by

no test coverage detected