mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-05-28 03:10:28 -04:00
Move suggestionTimer to general settings
This commit is contained in:
parent
4d06541a36
commit
384e07ba62
@ -145,7 +145,7 @@ void QodeAssistClient::scheduleRequest(TextEditor::TextEditorWidget *editor)
|
||||
}
|
||||
|
||||
it.value()->setProperty("cursorPosition", editor->textCursor().position());
|
||||
it.value()->start(settings().startSuggestionTimer());
|
||||
it.value()->start(Settings::generalSettings().startSuggestionTimer());
|
||||
}
|
||||
|
||||
void QodeAssistClient::handleCompletions(const GetCompletionRequest::Response &response,
|
||||
|
@ -45,11 +45,6 @@ QodeAssistSettings::QodeAssistSettings()
|
||||
{
|
||||
setAutoApply(false);
|
||||
|
||||
startSuggestionTimer.setSettingsKey(Constants::START_SUGGESTION_TIMER);
|
||||
startSuggestionTimer.setLabelText(Tr::tr("Start Suggestion Timer:"));
|
||||
startSuggestionTimer.setRange(10, 10000);
|
||||
startSuggestionTimer.setDefaultValue(500);
|
||||
|
||||
resetToDefaults.m_buttonText = Tr::tr("Reset to Defaults");
|
||||
|
||||
customJsonTemplate.setSettingsKey(Constants::CUSTOM_JSON_TEMPLATE);
|
||||
@ -171,7 +166,7 @@ void QodeAssistSettings::resetSettingsToDefaults()
|
||||
// resetAspect(presencePenalty);
|
||||
// resetAspect(useFrequencyPenalty);
|
||||
// resetAspect(frequencyPenalty);
|
||||
resetAspect(startSuggestionTimer);
|
||||
// resetAspect(startSuggestionTimer);
|
||||
// resetAspect(enableLogging);
|
||||
// resetAspect(ollamaLivetime);
|
||||
// resetAspect(specificInstractions);
|
||||
|
@ -57,8 +57,6 @@ class QodeAssistSettings : public Utils::AspectContainer
|
||||
public:
|
||||
QodeAssistSettings();
|
||||
|
||||
Utils::IntegerAspect startSuggestionTimer{this};
|
||||
|
||||
Utils::StringAspect customJsonTemplate{this};
|
||||
ButtonAspect saveCustomTemplateButton{this};
|
||||
ButtonAspect loadCustomTemplateButton{this};
|
||||
|
@ -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");
|
||||
|
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user