fix: truncate webfetch content to fit context

This commit is contained in:
2026-09-30 15:01:28 +02:00
parent e700a4f96b
commit e2786a3f1e
31 changed files with 1386 additions and 135 deletions
+3
View File
@@ -1,6 +1,7 @@
#include "chat.hpp"
#include "config.hpp"
#include "filetool.hpp"
#include "llm.hpp"
#include "llmclient.hpp"
#include "webfetchtool.hpp"
@@ -17,6 +18,7 @@ Chat::Chat(QObject* parent)
m_store->setLlmClient(m_client);
m_client->tools()->registerTool(new WebFetchTool(m_client->tools()));
m_client->tools()->registerTool(new FileReadTool(m_client->tools()));
const auto* llm = config::Config::instance()->llm();
m_client->setEndpoint(llm->endpoint());
@@ -137,6 +139,7 @@ QString Chat::streamingChatId() const {
return m_client->streamingChatId();
}
Chat* Chat::s_instance = nullptr;
Chat* Chat::create(QQmlEngine*, QJSEngine*) {