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

Method installConda

src/plugins/chat/chatmanager.cpp:560–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

558}
559
560void ChatManager::installConda()
561{
562 if (installCondaTimer.isActive())
563 return;
564
565 QString scriptPath = CustomPaths::CustomPaths::global(CustomPaths::Scripts) + "/rag/install.sh";
566 QProcess process;
567 process.setProgram("ps");
568 process.setArguments({ "aux" });
569 process.start();
570 process.waitForFinished();
571 QString output = process.readAll();
572
573 // check install script is running
574 bool exists = output.contains(scriptPath);
575 if (exists)
576 return;
577 auto terminalServ = dpfGetService(dpfservice::TerminalService);
578 WindowService *windowService = dpfGetService(WindowService);
579 windowService->switchContextWidget(dpfservice::TERMINAL_TAB_TEXT);
580 terminalServ->executeCommand("install", "bash", QStringList() << scriptPath << condaRootPath(), condaRootPath(), QStringList());
581
582 installCondaTimer.setSingleShot(true); // terminal may not execute it immediately. add timer to Prevent multiple triggers within a short period of time.
583 installCondaTimer.start(2000);
584}
585
586void ChatManager::generateRag(const QString &projectPath)
587{

Callers 1

Calls 8

readAllMethod · 0.80
switchContextWidgetMethod · 0.80
isActiveMethod · 0.45
setProgramMethod · 0.45
setArgumentsMethod · 0.45
startMethod · 0.45
containsMethod · 0.45
executeCommandMethod · 0.45

Tested by

no test coverage detected