refactor: Decouple prompt template manager from their users (#115)

This makes it possible to test the user classes
This commit is contained in:
Povilas Kanapickas
2025-03-10 03:13:10 +02:00
committed by GitHub
parent b6f36d61ae
commit 98e1047bf1
13 changed files with 179 additions and 20 deletions

View File

@ -45,7 +45,8 @@ namespace QodeAssist::Chat {
ChatRootView::ChatRootView(QQuickItem *parent)
: QQuickItem(parent)
, m_chatModel(new ChatModel(this))
, m_clientInterface(new ClientInterface(m_chatModel, this))
, m_promptProvider(LLMCore::PromptTemplateManager::instance())
, m_clientInterface(new ClientInterface(m_chatModel, &m_promptProvider, this))
{
m_isSyncOpenFiles = Settings::chatAssistantSettings().linkOpenFiles();
connect(