frontend stores ENABLE_AUTOCOMPLETE_GENERATION state, prevents making autocomplete request if turned off

This commit is contained in:
yfzhou
2025-02-09 17:09:23 +08:00
parent e9d6ada25c
commit 11f0c48434
3 changed files with 3 additions and 1 deletions

View File

@@ -695,7 +695,7 @@
)}
placeholder={placeholder ? placeholder : $i18n.t('Send a Message')}
largeTextAsFile={$settings?.largeTextAsFile ?? false}
autocomplete={true}
autocomplete={$config?.features.enable_autocomplete_generation}
generateAutoCompletion={async (text) => {
if (selectedModelIds.length === 0 || !selectedModelIds.at(0)) {
toast.error($i18n.t('Please select a model first.'));

View File

@@ -206,6 +206,7 @@ type Config = {
enable_admin_export: boolean;
enable_admin_chat_access: boolean;
enable_community_sharing: boolean;
enable_autocomplete_generation: boolean;
};
oauth: {
providers: {