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

Method sendMessage

app/src/AI/Assistant.cpp:455–469  ·  view source on GitHub ↗

* @brief Forwards a user message to the active conversation after the availability gate. */

Source from the content-addressed store, hash-verified

453 * @brief Forwards a user message to the active conversation after the availability gate.
454 */
455void AI::Assistant::sendMessage(const QString& userText)
456{
457 if (!isProAvailable()) {
458 Q_EMIT errorOccurred(tr("AI Assistant is not available in this build"));
459 return;
460 }
461
462 if (!hasAnyKey()) {
463 Q_EMIT errorOccurred(tr("Set an API key first"));
464 return;
465 }
466
467 rewireConversationProvider();
468 m_conversation->start(userText);
469}
470
471/**
472 * @brief Aborts the in-flight reply, if any.

Callers 1

issueRequestMethod · 0.45

Calls 1

startMethod · 0.45

Tested by

no test coverage detected