mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-13 04:45:19 +00:00
enh/refac: enable autocompletion for non rich text input
This commit is contained in:
parent
3207998114
commit
f1c317349e
2 changed files with 22 additions and 22 deletions
|
|
@ -998,6 +998,27 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
{#if $config?.features?.enable_autocomplete_generation}
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div id="prompt-autocompletion-label" class=" self-center text-xs">
|
||||
{$i18n.t('Prompt Autocompletion')}
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2 p-1">
|
||||
<Switch
|
||||
ariaLabelledbyId="prompt-autocompletion-label"
|
||||
tooltip={true}
|
||||
bind:state={promptAutocomplete}
|
||||
on:change={() => {
|
||||
saveSettings({ promptAutocomplete });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{#if richTextInput}
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
|
|
@ -1036,27 +1057,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{#if $config?.features?.enable_autocomplete_generation}
|
||||
<div>
|
||||
<div class=" py-0.5 flex w-full justify-between">
|
||||
<div id="prompt-autocompletion-label" class=" self-center text-xs">
|
||||
{$i18n.t('Prompt Autocompletion')}
|
||||
</div>
|
||||
|
||||
<div class="flex items-center gap-2 p-1">
|
||||
<Switch
|
||||
ariaLabelledbyId="prompt-autocompletion-label"
|
||||
tooltip={true}
|
||||
bind:state={promptAutocomplete}
|
||||
on:change={() => {
|
||||
saveSettings({ promptAutocomplete });
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -725,7 +725,7 @@
|
|||
})
|
||||
]
|
||||
: []),
|
||||
...(richText && autocomplete
|
||||
...(autocomplete
|
||||
? [
|
||||
AIAutocompletion.configure({
|
||||
generateCompletion: async (text) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue