Skip to content

Commit

Permalink
Version 0.1.1
Browse files Browse the repository at this point in the history
Fixed settings layouts
  • Loading branch information
Palm1r committed Sep 8, 2024
2 parents 397dd33 + 539a220 commit faaf59f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion QodeAssist.json.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name" : "QodeAssist",
"Version" : "0.1.0",
"Version" : "0.1.1",
"CompatVersion" : "${IDE_VERSION_COMPAT}",
"Vendor" : "Petr Mironychev",
"Copyright" : "(C) ${IDE_COPYRIGHT_YEAR} Petr Mironychev, (C) ${IDE_COPYRIGHT_YEAR} The Qt Company Ltd",
Expand Down
4 changes: 2 additions & 2 deletions settings/ContextSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ ContextSettings::ContextSettings()
setLayouter([this]() {
using namespace Layouting;
return Column{Row{readFullFile, Stretch{1}, resetToDefaults},
readStringsBeforeCursor,
readStringsAfterCursor,
Row{readStringsBeforeCursor, Stretch{1}},
Row{readStringsAfterCursor, Stretch{1}},
useFilePathInContext,
useSpecificInstructions,
specificInstractions,
Expand Down
19 changes: 9 additions & 10 deletions settings/GeneralSettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,20 @@ GeneralSettings::GeneralSettings()
multiLineCompletion.setLabelText(Tr::tr("Enable Multiline Completion"));

startSuggestionTimer.setSettingsKey(Constants::START_SUGGESTION_TIMER);
startSuggestionTimer.setLabelText(Tr::tr("Start Suggestion Timer:"));
startSuggestionTimer.setLabelText(Tr::tr("with delay(ms)"));
startSuggestionTimer.setRange(10, 10000);
startSuggestionTimer.setDefaultValue(500);

autoCompletionCharThreshold.setSettingsKey(Constants::AUTO_COMPLETION_CHAR_THRESHOLD);
autoCompletionCharThreshold.setLabelText(
Tr::tr("Character threshold for AI suggestion start:"));
autoCompletionCharThreshold.setLabelText(Tr::tr("AI suggestion triggers after typing"));
autoCompletionCharThreshold.setToolTip(
Tr::tr("The number of characters that need to be typed within the typing interval "
"before an AI suggestion request is sent."));
autoCompletionCharThreshold.setRange(1, 10);
autoCompletionCharThreshold.setDefaultValue(2);
autoCompletionCharThreshold.setRange(0, 10);
autoCompletionCharThreshold.setDefaultValue(1);

autoCompletionTypingInterval.setSettingsKey(Constants::AUTO_COMPLETION_TYPING_INTERVAL);
autoCompletionTypingInterval.setLabelText(
Tr::tr("Typing interval for AI suggestion start(ms):"));
autoCompletionTypingInterval.setLabelText(Tr::tr("character(s) within(ms)"));
autoCompletionTypingInterval.setToolTip(
Tr::tr("The time window (in milliseconds) during which the character threshold "
"must be met to trigger an AI suggestion request."));
Expand Down Expand Up @@ -138,10 +136,11 @@ GeneralSettings::GeneralSettings()

auto rootLayout = Column{Row{enableQodeAssist, Stretch{1}, resetToDefaults},
enableAutoComplete,
startSuggestionTimer,
autoCompletionCharThreshold,
autoCompletionTypingInterval,
multiLineCompletion,
Row{autoCompletionCharThreshold,
autoCompletionTypingInterval,
startSuggestionTimer,
Stretch{1}},
Space{8},
enableLogging,
Space{8},
Expand Down

0 comments on commit faaf59f

Please sign in to comment.