Move suggestionTimer to general settings

This commit is contained in:
Petr Mironychev
2024-09-08 00:18:23 +02:00
parent 4d06541a36
commit 384e07ba62
5 changed files with 10 additions and 9 deletions

View File

@ -61,6 +61,11 @@ GeneralSettings::GeneralSettings()
multiLineCompletion.setDefaultValue(true);
multiLineCompletion.setLabelText(Tr::tr("Enable Multiline Completion"));
startSuggestionTimer.setSettingsKey(Constants::START_SUGGESTION_TIMER);
startSuggestionTimer.setLabelText(Tr::tr("Start Suggestion Timer:"));
startSuggestionTimer.setRange(10, 10000);
startSuggestionTimer.setDefaultValue(500);
llmProviders.setSettingsKey(Constants::LLM_PROVIDERS);
llmProviders.setDisplayName(Tr::tr("LLM Providers:"));
llmProviders.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
@ -115,6 +120,7 @@ GeneralSettings::GeneralSettings()
auto rootLayout = Column{Row{enableQodeAssist, Stretch{1}, resetToDefaults},
enableAutoComplete,
startSuggestionTimer,
multiLineCompletion,
Space{8},
enableLogging,
@ -201,6 +207,7 @@ void GeneralSettings::resetPageToDefaults()
resetAspect(modelName);
resetAspect(fimPrompts);
resetAspect(enableLogging);
resetAspect(startSuggestionTimer);
}
fimPrompts.setStringValue("StarCoder2");

View File

@ -34,6 +34,7 @@ public:
Utils::BoolAspect enableAutoComplete{this};
Utils::BoolAspect multiLineCompletion{this};
Utils::BoolAspect enableLogging{this};
Utils::IntegerAspect startSuggestionTimer{this};
Utils::SelectionAspect llmProviders{this};
Utils::StringAspect url{this};