diff --git a/src/lib/components/chat/MessageInput.svelte b/src/lib/components/chat/MessageInput.svelte index 2170310a8..cd2699c00 100644 --- a/src/lib/components/chat/MessageInput.svelte +++ b/src/lib/components/chat/MessageInput.svelte @@ -694,7 +694,8 @@ ))} placeholder={placeholder ? placeholder : $i18n.t('Send a Message')} largeTextAsFile={$settings?.largeTextAsFile ?? false} - autocomplete={$config?.features.enable_autocomplete_generation} + autocomplete={$config?.features?.enable_autocomplete_generation && + ($settings?.promptAutocomplete ?? false)} generateAutoCompletion={async (text) => { if (selectedModelIds.length === 0 || !selectedModelIds.at(0)) { toast.error($i18n.t('Please select a model first.')); diff --git a/src/lib/components/chat/Settings/Interface.svelte b/src/lib/components/chat/Settings/Interface.svelte index 76ff6ae01..b0a0b7970 100644 --- a/src/lib/components/chat/Settings/Interface.svelte +++ b/src/lib/components/chat/Settings/Interface.svelte @@ -30,10 +30,13 @@ // Interface let defaultModelId = ''; let showUsername = false; - let richTextInput = true; - let largeTextAsFile = false; let notificationSound = true; + let richTextInput = true; + let promptAutocomplete = false; + + let largeTextAsFile = false; + let landingPageMode = ''; let chatBubble = true; let chatDirection: 'LTR' | 'RTL' = 'LTR'; @@ -73,6 +76,11 @@ saveSettings({ splitLargeChunks: splitLargeChunks }); }; + const togglePromptAutocomplete = async () => { + promptAutocomplete = !promptAutocomplete; + saveSettings({ promptAutocomplete: promptAutocomplete }); + }; + const togglesScrollOnBranchChange = async () => { scrollOnBranchChange = !scrollOnBranchChange; saveSettings({ scrollOnBranchChange: scrollOnBranchChange }); @@ -238,6 +246,7 @@ voiceInterruption = $settings.voiceInterruption ?? false; richTextInput = $settings.richTextInput ?? true; + promptAutocomplete = $settings.promptAutocomplete ?? false; largeTextAsFile = $settings.largeTextAsFile ?? false; collapseCodeBlocks = $settings.collapseCodeBlocks ?? false; @@ -564,6 +573,30 @@ + {#if $config?.features?.enable_autocomplete_generation && richTextInput} +