| 583 | } |
| 584 | |
| 585 | void QuickRefactorDialog::loadAvailableConfigurations() |
| 586 | { |
| 587 | auto &manager = Settings::ConfigurationManager::instance(); |
| 588 | manager.loadConfigurations(Settings::ConfigurationType::QuickRefactor); |
| 589 | |
| 590 | QVector<Settings::AIConfiguration> configs = manager.configurations( |
| 591 | Settings::ConfigurationType::QuickRefactor); |
| 592 | |
| 593 | m_configComboBox->clear(); |
| 594 | m_configComboBox->addItem(Tr::tr("Current"), QString()); |
| 595 | |
| 596 | for (const Settings::AIConfiguration &config : configs) { |
| 597 | m_configComboBox->addItem(config.name, config.id); |
| 598 | } |
| 599 | |
| 600 | auto &settings = Settings::generalSettings(); |
| 601 | QString currentProvider = settings.qrProvider.value(); |
| 602 | QString currentModel = settings.qrModel.value(); |
| 603 | QString currentConfigText = QString("%1/%2").arg(currentProvider, currentModel); |
| 604 | m_configComboBox->setItemText(0, Tr::tr("Current (%1)").arg(currentConfigText)); |
| 605 | } |
| 606 | |
| 607 | void QuickRefactorDialog::onConfigurationChanged(int index) |
| 608 | { |
nothing calls this directly
no test coverage detected