From 97163cf6c98eb54433a491adea39999b7cd5c10e Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Fri, 24 Jan 2025 01:08:30 +0100 Subject: [PATCH] fix: Add calculate tokens after clean chat --- ChatView/ChatRootView.hpp | 2 +- ChatView/qml/RootItem.qml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/ChatView/ChatRootView.hpp b/ChatView/ChatRootView.hpp index 22c2033..fb8adf2 100644 --- a/ChatView/ChatRootView.hpp +++ b/ChatView/ChatRootView.hpp @@ -65,7 +65,7 @@ class ChatRootView : public QQuickItem Q_INVOKABLE void calculateMessageTokensCount(const QString &message); Q_INVOKABLE void setIsSyncOpenFiles(bool state); - void updateInputTokensCount(); + Q_INVOKABLE void updateInputTokensCount(); int inputTokensCount() const; bool isSyncOpenFiles() const; diff --git a/ChatView/qml/RootItem.qml b/ChatView/qml/RootItem.qml index 8beaa01..303739a 100644 --- a/ChatView/qml/RootItem.qml +++ b/ChatView/qml/RootItem.qml @@ -203,6 +203,7 @@ ChatRootView { function clearChat() { root.chatModel.clear() root.clearAttachmentFiles() + root.updateInputTokensCount() } function scrollToBottom() {