mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-06-04 01:28:58 -04:00
Fix names, icon and tips
This commit is contained in:
parent
f64ea42071
commit
216c28aa5e
@ -137,6 +137,8 @@ public:
|
|||||||
setId(Constants::QODE_ASSIST_CONTEXT_SETTINGS_PAGE_ID);
|
setId(Constants::QODE_ASSIST_CONTEXT_SETTINGS_PAGE_ID);
|
||||||
setDisplayName(Tr::tr("Context"));
|
setDisplayName(Tr::tr("Context"));
|
||||||
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY);
|
setCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_CATEGORY);
|
||||||
|
setDisplayCategory(Constants::QODE_ASSIST_GENERAL_OPTIONS_DISPLAY_CATEGORY);
|
||||||
|
setCategoryIconPath(":/resources/images/qoderassist-icon.png");
|
||||||
setSettingsProvider([] { return &contextSettings(); });
|
setSettingsProvider([] { return &contextSettings(); });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -46,8 +46,15 @@ CustomPromptSettings::CustomPromptSettings()
|
|||||||
customJsonLabel.setLabelText("Custom JSON Template:");
|
customJsonLabel.setLabelText("Custom JSON Template:");
|
||||||
customJsonLabel.setDisplayStyle(Utils::StringAspect::LabelDisplay);
|
customJsonLabel.setDisplayStyle(Utils::StringAspect::LabelDisplay);
|
||||||
|
|
||||||
|
customJsonLegend.setLabelText(Tr::tr(R"(Prompt components:
|
||||||
|
- {{QODE_INSTRUCTIONS}}: Placeholder for specific instructions or context.
|
||||||
|
- {{QODE_PREFIX}}: Will be replaced with the actual code before the cursor.
|
||||||
|
- {{QODE_SUFFIX}}: Will be replaced with the actual code after the cursor.
|
||||||
|
)"));
|
||||||
|
|
||||||
customJsonTemplate.setSettingsKey(Constants::CUSTOM_JSON_TEMPLATE);
|
customJsonTemplate.setSettingsKey(Constants::CUSTOM_JSON_TEMPLATE);
|
||||||
customJsonTemplate.setDisplayStyle(Utils::StringAspect::TextEditDisplay);
|
customJsonTemplate.setDisplayStyle(Utils::StringAspect::TextEditDisplay);
|
||||||
|
|
||||||
customJsonTemplate.setDefaultValue(R"({
|
customJsonTemplate.setDefaultValue(R"({
|
||||||
"prompt": "{{QODE_INSTRUCTIONS}}<fim_prefix>{{QODE_PREFIX}}<fim_suffix>{{QODE_SUFFIX}}<fim_middle>",
|
"prompt": "{{QODE_INSTRUCTIONS}}<fim_prefix>{{QODE_PREFIX}}<fim_suffix>{{QODE_SUFFIX}}<fim_middle>",
|
||||||
"options": {
|
"options": {
|
||||||
@ -79,7 +86,10 @@ CustomPromptSettings::CustomPromptSettings()
|
|||||||
using namespace Layouting;
|
using namespace Layouting;
|
||||||
return Column{Row{customJsonLabel, Stretch{1}, resetToDefaults},
|
return Column{Row{customJsonLabel, Stretch{1}, resetToDefaults},
|
||||||
Row{customJsonTemplate,
|
Row{customJsonTemplate,
|
||||||
Column{saveCustomTemplateButton, loadCustomTemplateButton, Stretch{1}}}};
|
Column{saveCustomTemplateButton,
|
||||||
|
loadCustomTemplateButton,
|
||||||
|
customJsonLegend,
|
||||||
|
Stretch{1}}}};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ public:
|
|||||||
|
|
||||||
Utils::StringAspect customJsonLabel{this};
|
Utils::StringAspect customJsonLabel{this};
|
||||||
Utils::StringAspect customJsonTemplate{this};
|
Utils::StringAspect customJsonTemplate{this};
|
||||||
|
Utils::StringAspect customJsonLegend{this};
|
||||||
ButtonAspect saveCustomTemplateButton{this};
|
ButtonAspect saveCustomTemplateButton{this};
|
||||||
ButtonAspect loadCustomTemplateButton{this};
|
ButtonAspect loadCustomTemplateButton{this};
|
||||||
ButtonAspect resetToDefaults{this};
|
ButtonAspect resetToDefaults{this};
|
||||||
|
@ -67,7 +67,7 @@ GeneralSettings::GeneralSettings()
|
|||||||
startSuggestionTimer.setDefaultValue(500);
|
startSuggestionTimer.setDefaultValue(500);
|
||||||
|
|
||||||
llmProviders.setSettingsKey(Constants::LLM_PROVIDERS);
|
llmProviders.setSettingsKey(Constants::LLM_PROVIDERS);
|
||||||
llmProviders.setDisplayName(Tr::tr("LLM Providers:"));
|
llmProviders.setDisplayName(Tr::tr("FIM Provider:"));
|
||||||
llmProviders.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
llmProviders.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
||||||
llmProviders.setDefaultValue(0);
|
llmProviders.setDefaultValue(0);
|
||||||
|
|
||||||
@ -76,16 +76,16 @@ GeneralSettings::GeneralSettings()
|
|||||||
url.setDisplayStyle(Utils::StringAspect::LineEditDisplay);
|
url.setDisplayStyle(Utils::StringAspect::LineEditDisplay);
|
||||||
|
|
||||||
endPoint.setSettingsKey(Constants::END_POINT);
|
endPoint.setSettingsKey(Constants::END_POINT);
|
||||||
endPoint.setLabelText(Tr::tr("Endpoint:"));
|
endPoint.setLabelText(Tr::tr("FIM Endpoint:"));
|
||||||
endPoint.setDisplayStyle(Utils::StringAspect::LineEditDisplay);
|
endPoint.setDisplayStyle(Utils::StringAspect::LineEditDisplay);
|
||||||
|
|
||||||
modelName.setSettingsKey(Constants::MODEL_NAME);
|
modelName.setSettingsKey(Constants::MODEL_NAME);
|
||||||
modelName.setLabelText(Tr::tr("LLM Name:"));
|
modelName.setLabelText(Tr::tr("LLM Name:"));
|
||||||
modelName.setDisplayStyle(Utils::StringAspect::LineEditDisplay);
|
modelName.setDisplayStyle(Utils::StringAspect::LineEditDisplay);
|
||||||
|
|
||||||
selectModels.m_buttonText = Tr::tr("Select Model");
|
selectModels.m_buttonText = Tr::tr("Select Fill-In-the-Middle Model");
|
||||||
|
|
||||||
fimPrompts.setDisplayName(Tr::tr("Fill-In-Middle Prompt"));
|
fimPrompts.setDisplayName(Tr::tr("Fill-In-the-Middle Prompt"));
|
||||||
fimPrompts.setSettingsKey(Constants::FIM_PROMPTS);
|
fimPrompts.setSettingsKey(Constants::FIM_PROMPTS);
|
||||||
fimPrompts.setDefaultValue(0);
|
fimPrompts.setDefaultValue(0);
|
||||||
fimPrompts.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
fimPrompts.setDisplayStyle(Utils::SelectionAspect::DisplayStyle::ComboBox);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user