feat: Add too for reading original message history after compressing

This commit is contained in:
Petr Mironychev
2026-05-15 10:47:39 +02:00
parent 7704bffd88
commit cab2f0a55e
9 changed files with 255 additions and 1 deletions

View File

@@ -228,6 +228,8 @@ bool ChatCompressor::createCompressedChatFile(
summaryMessage["images"] = QJsonArray();
root["messages"] = QJsonArray{summaryMessage};
root["compressedFrom"] = sourcePath;
root["compressedAt"] = QDateTime::currentDateTime().toString(Qt::ISODate);
if (QFile::exists(destPath))
QFile::remove(destPath);

View File

@@ -28,6 +28,7 @@
#include <LLMQore/ToolsManager.hpp>
#include "tools/ReadOriginalHistoryTool.hpp"
#include "tools/TodoTool.hpp"
#include "ChatAssistantSettings.hpp"
@@ -305,6 +306,10 @@ void ClientInterface::sendMessage(
provider->toolsManager()->tool("todo_tool"))) {
todoTool->setCurrentSessionId(m_chatFilePath);
}
if (auto *historyTool = qobject_cast<QodeAssist::Tools::ReadOriginalHistoryTool *>(
provider->toolsManager()->tool("read_original_history"))) {
historyTool->setCurrentSessionId(m_chatFilePath);
}
}
}