MCPcopy Create free account
hub / github.com/Palm1r/QodeAssist / setChatFilePath

Method setChatFilePath

ChatView/ClientInterface.cpp:720–738  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

718}
719
720void ClientInterface::setChatFilePath(const QString &filePath)
721{
722 if (!m_chatFilePath.isEmpty() && m_chatFilePath != filePath) {
723 const auto providerName = Settings::generalSettings().caProvider();
724 auto *provider = PluginLLMCore::ProvidersManager::instance().getProviderByName(providerName);
725
726 if (provider
727 && provider->capabilities().testFlag(PluginLLMCore::ProviderCapability::Tools)
728 && provider->toolsManager()) {
729 if (auto *todoTool = qobject_cast<QodeAssist::Tools::TodoTool *>(
730 provider->toolsManager()->tool("todo_tool"))) {
731 todoTool->clearSession(m_chatFilePath);
732 }
733 }
734 }
735
736 m_chatFilePath = filePath;
737 m_chatModel->setChatFilePath(filePath);
738}
739
740QString ClientInterface::chatFilePath() const
741{

Callers

nothing calls this directly

Calls 5

getProviderByNameMethod · 0.80
isEmptyMethod · 0.45
capabilitiesMethod · 0.45
toolsManagerMethod · 0.45
clearSessionMethod · 0.45

Tested by

no test coverage detected