enh/refac: enable autocompletion for non rich text input

This commit is contained in:
Timothy Jaeryang Baek 2025-11-12 23:11:15 -05:00
parent 3207998114
commit f1c317349e
2 changed files with 22 additions and 22 deletions

View file

@ -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>

View file

@ -725,7 +725,7 @@
})
]
: []),
...(richText && autocomplete
...(autocomplete
? [
AIAutocompletion.configure({
generateCompletion: async (text) => {