refactor: Replace singletone for context manager (#151)

This commit is contained in:
Petr Mironychev
2025-04-01 22:29:45 +02:00
committed by GitHub
parent 7e6e526ac8
commit 79218d8412
9 changed files with 114 additions and 37 deletions

View File

@ -26,6 +26,7 @@
#include "ChatModel.hpp"
#include "RequestHandler.hpp"
#include "llmcore/IPromptProvider.hpp"
#include <context/ContextManager.hpp>
namespace QodeAssist::Chat {
@ -45,6 +46,8 @@ public:
void clearMessages();
void cancelRequest();
Context::ContextManager *contextManager() const;
signals:
void errorOccurred(const QString &error);
void messageReceivedCompletely();
@ -58,6 +61,7 @@ private:
LLMCore::IPromptProvider *m_promptProvider = nullptr;
ChatModel *m_chatModel;
LLMCore::RequestHandler *m_requestHandler;
Context::ContextManager *m_contextManager;
};
} // namespace QodeAssist::Chat