mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-05-28 03:10:28 -04:00
feat: Add settings for show progress bar
This commit is contained in:
parent
77aca17dcc
commit
7a4926ad7f
@ -151,7 +151,9 @@ void QodeAssistClient::requestCompletions(TextEditor::TextEditorWidget *editor)
|
||||
{TextDocumentIdentifier(hostPathToServerUri(filePath)),
|
||||
documentVersion(filePath),
|
||||
Position(cursor.mainCursor())}};
|
||||
m_progressHandler.showProgress(editor);
|
||||
if (Settings::codeCompletionSettings().showProgressWidget()) {
|
||||
m_progressHandler.showProgress(editor);
|
||||
}
|
||||
request.setResponseCallback([this, editor = QPointer<TextEditorWidget>(editor)](
|
||||
const GetCompletionRequest::Response &response) {
|
||||
QTC_ASSERT(editor, return);
|
||||
|
@ -202,6 +202,10 @@ CodeCompletionSettings::CodeCompletionSettings()
|
||||
"(space-separated), file extensions (space-separated)"));
|
||||
customLanguages.setDefaultValue({{"cmake,#,cmake,CMakeLists.txt"}, {"qmake,#,qmake,pro pri"}});
|
||||
|
||||
showProgressWidget.setSettingsKey(Constants::CC_SHOW_PROGRESS_WIDGET);
|
||||
showProgressWidget.setLabelText(Tr::tr("Show progress indicator during code completion"));
|
||||
showProgressWidget.setDefaultValue(true);
|
||||
|
||||
useProjectChangesCache.setSettingsKey(Constants::CC_USE_PROJECT_CHANGES_CACHE);
|
||||
useProjectChangesCache.setDefaultValue(true);
|
||||
useProjectChangesCache.setLabelText(Tr::tr("Max Changes Cache Size:"));
|
||||
@ -281,7 +285,8 @@ CodeCompletionSettings::CodeCompletionSettings()
|
||||
Row{autoCompletionCharThreshold,
|
||||
autoCompletionTypingInterval,
|
||||
startSuggestionTimer,
|
||||
Stretch{1}}}},
|
||||
Stretch{1}},
|
||||
showProgressWidget}},
|
||||
Space{8},
|
||||
Group{
|
||||
title(Tr::tr("General Parameters")),
|
||||
|
@ -44,6 +44,8 @@ public:
|
||||
|
||||
Utils::StringListAspect customLanguages{this};
|
||||
|
||||
Utils::BoolAspect showProgressWidget{this};
|
||||
|
||||
// General Parameters Settings
|
||||
Utils::DoubleAspect temperature{this};
|
||||
Utils::IntegerAspect maxTokens{this};
|
||||
|
@ -55,6 +55,7 @@ const char CC_PRESET1_URL_HISTORY[] = "QodeAssist.ccPreset1UrlHistory";
|
||||
// settings
|
||||
const char ENABLE_QODE_ASSIST[] = "QodeAssist.enableQodeAssist";
|
||||
const char CC_AUTO_COMPLETION[] = "QodeAssist.ccAutoCompletion";
|
||||
const char CC_SHOW_PROGRESS_WIDGET[] = "QodeAssist.ccShowProgressWidget";
|
||||
const char ENABLE_LOGGING[] = "QodeAssist.enableLogging";
|
||||
const char ENABLE_CHECK_UPDATE[] = "QodeAssist.enableCheckUpdate";
|
||||
const char ENABLE_CHAT[] = "QodeAssist.enableChat";
|
||||
|
Loading…
Reference in New Issue
Block a user