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) } }