fix: Filter empty thinking blocks for google ai

This commit is contained in:
Petr Mironychev
2025-11-17 11:35:03 +01:00
parent 9974b2f5e6
commit 995597d789

View File

@ -525,6 +525,11 @@ void GoogleAIProvider::emitPendingThinkingBlocks(const QString &requestId)
for (int i = alreadyEmitted; i < totalBlocks; ++i) { for (int i = alreadyEmitted; i < totalBlocks; ++i) {
auto thinkingContent = thinkingBlocks[i]; auto thinkingContent = thinkingBlocks[i];
if (thinkingContent->thinking().trimmed().isEmpty()) {
continue;
}
emit thinkingBlockReceived( emit thinkingBlockReceived(
requestId, requestId,
thinkingContent->thinking(), thinkingContent->thinking(),