fix: Remove token calibration

This commit is contained in:
Petr Mironychev
2026-06-28 22:10:29 +02:00
parent dc3100f054
commit a6921f523a
3 changed files with 30 additions and 35 deletions

View File

@@ -131,6 +131,7 @@ ChatRootView::ChatRootView(QQuickItem *parent)
connect(m_chatModel, &ChatModel::modelReseted, this, [this]() {
setRecentFilePath(QString{});
m_tokenCounter->resetServerUsage();
m_fileEditController->clearCurrentRequestId();
});
auto maybeEmitTitle = [this] {
@@ -231,8 +232,8 @@ ChatRootView::ChatRootView(QQuickItem *parent)
m_clientInterface,
&ClientInterface::messageUsageReceived,
this,
[this](int promptTokens, int /*completionTokens*/, int /*cached*/, int /*reasoning*/) {
m_tokenCounter->recordServerUsage(promptTokens);
[this](int promptTokens, int /*completionTokens*/, int cachedTokens, int /*reasoning*/) {
m_tokenCounter->recordServerUsage(promptTokens, cachedTokens);
});
connect(
@@ -489,8 +490,6 @@ void ChatRootView::dispatchSend(
}
}
m_tokenCounter->recordSent();
if (currentChatAgent().isEmpty())
loadAvailableChatAgents();