mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-06-04 01:28:58 -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)),
|
{TextDocumentIdentifier(hostPathToServerUri(filePath)),
|
||||||
documentVersion(filePath),
|
documentVersion(filePath),
|
||||||
Position(cursor.mainCursor())}};
|
Position(cursor.mainCursor())}};
|
||||||
m_progressHandler.showProgress(editor);
|
if (Settings::codeCompletionSettings().showProgressWidget()) {
|
||||||
|
m_progressHandler.showProgress(editor);
|
||||||
|
}
|
||||||
request.setResponseCallback([this, editor = QPointer<TextEditorWidget>(editor)](
|
request.setResponseCallback([this, editor = QPointer<TextEditorWidget>(editor)](
|
||||||
const GetCompletionRequest::Response &response) {
|
const GetCompletionRequest::Response &response) {
|
||||||
QTC_ASSERT(editor, return);
|
QTC_ASSERT(editor, return);
|
||||||
|
@ -202,6 +202,10 @@ CodeCompletionSettings::CodeCompletionSettings()
|
|||||||
"(space-separated), file extensions (space-separated)"));
|
"(space-separated), file extensions (space-separated)"));
|
||||||
customLanguages.setDefaultValue({{"cmake,#,cmake,CMakeLists.txt"}, {"qmake,#,qmake,pro pri"}});
|
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.setSettingsKey(Constants::CC_USE_PROJECT_CHANGES_CACHE);
|
||||||
useProjectChangesCache.setDefaultValue(true);
|
useProjectChangesCache.setDefaultValue(true);
|
||||||
useProjectChangesCache.setLabelText(Tr::tr("Max Changes Cache Size:"));
|
useProjectChangesCache.setLabelText(Tr::tr("Max Changes Cache Size:"));
|
||||||
@ -281,7 +285,8 @@ CodeCompletionSettings::CodeCompletionSettings()
|
|||||||
Row{autoCompletionCharThreshold,
|
Row{autoCompletionCharThreshold,
|
||||||
autoCompletionTypingInterval,
|
autoCompletionTypingInterval,
|
||||||
startSuggestionTimer,
|
startSuggestionTimer,
|
||||||
Stretch{1}}}},
|
Stretch{1}},
|
||||||
|
showProgressWidget}},
|
||||||
Space{8},
|
Space{8},
|
||||||
Group{
|
Group{
|
||||||
title(Tr::tr("General Parameters")),
|
title(Tr::tr("General Parameters")),
|
||||||
|
@ -44,6 +44,8 @@ public:
|
|||||||
|
|
||||||
Utils::StringListAspect customLanguages{this};
|
Utils::StringListAspect customLanguages{this};
|
||||||
|
|
||||||
|
Utils::BoolAspect showProgressWidget{this};
|
||||||
|
|
||||||
// General Parameters Settings
|
// General Parameters Settings
|
||||||
Utils::DoubleAspect temperature{this};
|
Utils::DoubleAspect temperature{this};
|
||||||
Utils::IntegerAspect maxTokens{this};
|
Utils::IntegerAspect maxTokens{this};
|
||||||
|
@ -55,6 +55,7 @@ const char CC_PRESET1_URL_HISTORY[] = "QodeAssist.ccPreset1UrlHistory";
|
|||||||
// settings
|
// settings
|
||||||
const char ENABLE_QODE_ASSIST[] = "QodeAssist.enableQodeAssist";
|
const char ENABLE_QODE_ASSIST[] = "QodeAssist.enableQodeAssist";
|
||||||
const char CC_AUTO_COMPLETION[] = "QodeAssist.ccAutoCompletion";
|
const char CC_AUTO_COMPLETION[] = "QodeAssist.ccAutoCompletion";
|
||||||
|
const char CC_SHOW_PROGRESS_WIDGET[] = "QodeAssist.ccShowProgressWidget";
|
||||||
const char ENABLE_LOGGING[] = "QodeAssist.enableLogging";
|
const char ENABLE_LOGGING[] = "QodeAssist.enableLogging";
|
||||||
const char ENABLE_CHECK_UPDATE[] = "QodeAssist.enableCheckUpdate";
|
const char ENABLE_CHECK_UPDATE[] = "QodeAssist.enableCheckUpdate";
|
||||||
const char ENABLE_CHAT[] = "QodeAssist.enableChat";
|
const char ENABLE_CHAT[] = "QodeAssist.enableChat";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user