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 @@ public: 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() {