{ updateInterfaceHandler(); dispatch('save'); }} >
{ let reader = new FileReader(); reader.onload = (event) => { let originalImageUrl = `${event.target.result}`; backgroundImageUrl = originalImageUrl; saveSettings({ backgroundImageUrl }); }; if ( inputFiles && inputFiles.length > 0 && ['image/gif', 'image/webp', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type']) ) { reader.readAsDataURL(inputFiles[0]); } else { console.log(`Unsupported File Type '${inputFiles[0]['type']}'.`); inputFiles = null; } }} />
{$i18n.t('Default Model')}
{$i18n.t('Select a model')}
{#each $models.filter((model) => model.id) as model}
{model.name}
{/each}
{$i18n.t('UI')}
{$i18n.t('Landing Page Mode')}
{ toggleLandingPageMode(); }} type="button" > {#if landingPageMode === ''}
{$i18n.t('Default')}
{:else}
{$i18n.t('Chat')}
{/if}
{$i18n.t('Chat Bubble UI')}
{ toggleChatBubble(); }} type="button" > {#if chatBubble === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{#if !$settings.chatBubble}
{$i18n.t('Display the username instead of You in the Chat')}
{ toggleShowUsername(); }} type="button" > {#if showUsername === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{/if}
{$i18n.t('Widescreen Mode')}
{ toggleWidescreenMode(); }} type="button" > {#if widescreenMode === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Chat direction')}
{#if chatDirection === 'LTR'}
{$i18n.t('LTR')}
{:else}
{$i18n.t('RTL')}
{/if}
{#if $user.role === 'admin'}
{$i18n.t('Toast notifications for new updates')}
{ toggleShowUpdateToast(); }} type="button" > {#if showUpdateToast === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{/if}
{$i18n.t('Fluidly stream large external response chunks')}
{ toggleSplitLargeChunks(); }} type="button" > {#if splitLargeChunks === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Scroll to bottom when switching between branches')}
{ togglesScrollOnBranchChange(); }} type="button" > {#if scrollOnBranchChange === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Rich Text Input for Chat')}
{ toggleRichTextInput(); }} type="button" > {#if richTextInput === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Chat Background Image')}
{ if (backgroundImageUrl !== null) { backgroundImageUrl = null; saveSettings({ backgroundImageUrl }); } else { filesInputElement.click(); } }} type="button" > {#if backgroundImageUrl !== null}
{$i18n.t('Reset')}
{:else}
{$i18n.t('Upload')}
{/if}
{$i18n.t('Chat')}
{$i18n.t('Title Auto-Generation')}
{ toggleTitleAutoGenerate(); }} type="button" > {#if titleAutoGenerate === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Chat Tags Auto-Generation')}
{ toggleAutoTags(); }} type="button" > {#if autoTags === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Response AutoCopy to Clipboard')}
{ toggleResponseAutoCopy(); }} type="button" > {#if responseAutoCopy === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Allow User Location')}
{ toggleUserLocation(); }} type="button" > {#if userLocation === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Haptic Feedback')}
{ toggleHapticFeedback(); }} type="button" > {#if hapticFeedback === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Voice')}
{$i18n.t('Allow Voice Interruption in Call')}
{ toggleVoiceInterruption(); }} type="button" > {#if voiceInterruption === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Display Emoji in Call')}
{ toggleEmojiInCall(); }} type="button" > {#if showEmojiInCall === true}
{$i18n.t('On')}
{:else}
{$i18n.t('Off')}
{/if}
{$i18n.t('Save')}