fix: Handling request error on provider error

This commit is contained in:
Petr Mironychev
2025-10-10 10:53:06 +02:00
parent d2b28093a6
commit b4e8bdf6da
5 changed files with 131 additions and 0 deletions

View File

@ -132,6 +132,11 @@ ChatRootView::ChatRootView(QQuickItem *parent)
&Utils::BaseAspect::changed,
this,
&ChatRootView::textFormatChanged);
connect(m_clientInterface, &ClientInterface::errorOccurred, this, [this](const QString &error) {
this->setRequestProgressStatus(false);
m_lastErrorMessage = error;
emit lastErrorMessageChanged();
});
updateInputTokensCount();
}
@ -622,4 +627,9 @@ void ChatRootView::setRequestProgressStatus(bool state)
emit isRequestInProgressChanged();
}
QString ChatRootView::lastErrorMessage() const
{
return m_lastErrorMessage;
}
} // namespace QodeAssist::Chat