MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / initConnections

Method initConnections

src/plugins/chat/chatmanager.cpp:401–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401void ChatManager::initConnections()
402{
403 connect(this, &ChatManager::noChunksFounded, this, &ChatManager::showIndexingWidget);
404
405 connect(Copilot::instance(), &Copilot::messageSended, this, &ChatManager::startReceiving);
406
407 connect(this, &ChatManager::requestStop, Copilot::instance(), &Copilot::requestStop);
408 connect(this, &ChatManager::notify, this, [](int type, const QString &message, QStringList actions) {
409 WindowService *windowService = dpfGetService(WindowService);
410 windowService->notify(type, "Ai", message, actions);
411 });
412 connect(this, &ChatManager::sendSyncRequest, this, &ChatManager::slotSendSyncRequest);
413 connect(this, &ChatManager::llmChanged, Copilot::instance(), [=](const LLMInfo &info) {
414 auto aiSrv = dpfGetService(AiService);
415 auto copilotLLM = aiSrv->getLLM(info); // Use a new LLM to avoid affecting chatLLM
416 if (copilotLLM)
417 Copilot::instance()->setCopilotLLM(copilotLLM);
418 });
419}
420
421void ChatManager::initLLM(AbstractLLM *llm)
422{

Callers

nothing calls this directly

Calls 4

connectFunction · 0.85
getLLMMethod · 0.80
setCopilotLLMMethod · 0.80
notifyMethod · 0.45

Tested by

no test coverage detected