From 09c38c8b0ed06b808c210cc76cb95c745ce74a28 Mon Sep 17 00:00:00 2001 From: Petr Mironychev <9195189+Palm1r@users.noreply.github.com> Date: Mon, 27 Jan 2025 09:44:17 +0100 Subject: [PATCH] fix: Rebase on main --- ChatView/ChatRootView.cpp | 4 ++-- ChatView/ChatRootView.hpp | 3 ++- ChatView/qml/RootItem.qml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChatView/ChatRootView.cpp b/ChatView/ChatRootView.cpp index 88d15ef..256c133 100644 --- a/ChatView/ChatRootView.cpp +++ b/ChatView/ChatRootView.cpp @@ -449,7 +449,7 @@ void ChatRootView::openChatHistoryFolder() QDesktopServices::openUrl(url); } -void ChatRootView::testRAG() +void ChatRootView::testRAG(const QString &message) { auto project = ProjectExplorer::ProjectTree::currentProject(); if (!project) { @@ -457,7 +457,7 @@ void ChatRootView::testRAG() return; } - const QString TEST_QUERY = ""; + const QString TEST_QUERY = message; qDebug() << "Starting RAG test with query:"; qDebug() << TEST_QUERY; diff --git a/ChatView/ChatRootView.hpp b/ChatView/ChatRootView.hpp index 339635f..440e7ad 100644 --- a/ChatView/ChatRootView.hpp +++ b/ChatView/ChatRootView.hpp @@ -64,7 +64,8 @@ public: Q_INVOKABLE void removeFileFromLinkList(int index); Q_INVOKABLE void calculateMessageTokensCount(const QString &message); Q_INVOKABLE void setIsSyncOpenFiles(bool state); - Q_INVOKABLE void testRAG(); + Q_INVOKABLE void openChatHistoryFolder(); + Q_INVOKABLE void testRAG(const QString &message); Q_INVOKABLE void updateInputTokensCount(); int inputTokensCount() const; diff --git a/ChatView/qml/RootItem.qml b/ChatView/qml/RootItem.qml index 54dea16..fa9869d 100644 --- a/ChatView/qml/RootItem.qml +++ b/ChatView/qml/RootItem.qml @@ -198,7 +198,7 @@ ChatRootView { } attachFiles.onClicked: root.showAttachFilesDialog() linkFiles.onClicked: root.showLinkFilesDialog() - testRag.onClicked: root.testRAG() + testRag.onClicked: root.testRAG(messageInput.text) } }