mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import AdvancedParams from '../Settings/Advanced/AdvancedParams.svelte';
|
||||
import Valves from '$lib/components/common/Valves.svelte';
|
||||
import FileItem from '$lib/components/common/FileItem.svelte';
|
||||
import Collapsible from '$lib/components/common/Collapsible.svelte';
|
||||
|
||||
export let models = [];
|
||||
|
||||
@@ -28,12 +29,10 @@
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class=" dark:text-gray-200 text-sm font-primary">
|
||||
<div class=" dark:text-gray-200 text-sm font-primary py-0.5">
|
||||
{#if chatFiles.length > 0}
|
||||
<div>
|
||||
<div class="mb-1.5 font-medium">{$i18n.t('Files')}</div>
|
||||
|
||||
<div class="flex flex-col gap-1">
|
||||
<Collapsible title={$i18n.t('Files')} open={true}>
|
||||
<div class="flex flex-col gap-1 mt-1.5" slot="content">
|
||||
{#each chatFiles as file, fileIdx}
|
||||
<FileItem
|
||||
className="w-full"
|
||||
@@ -50,7 +49,7 @@
|
||||
/>
|
||||
{/each}
|
||||
</div>
|
||||
</div>
|
||||
</Collapsible>
|
||||
|
||||
<hr class="my-2 border-gray-100 dark:border-gray-800" />
|
||||
{/if}
|
||||
@@ -67,27 +66,25 @@
|
||||
<hr class="my-2 border-gray-100 dark:border-gray-800" />
|
||||
{/if}
|
||||
|
||||
<div>
|
||||
<div class="mb-1.5 font-medium">{$i18n.t('System Prompt')}</div>
|
||||
|
||||
<div>
|
||||
<Collapsible title={$i18n.t('System Prompt')} open={true}>
|
||||
<div class=" mt-1.5" slot="content">
|
||||
<textarea
|
||||
bind:value={params.system}
|
||||
class="w-full rounded-lg px-4 py-3 text-sm dark:text-gray-300 dark:bg-gray-850 border border-gray-100 dark:border-gray-800 outline-none resize-none"
|
||||
rows="3"
|
||||
class="w-full rounded-lg px-3.5 py-2.5 text-sm dark:text-gray-300 dark:bg-gray-850 border border-gray-100 dark:border-gray-800 outline-none resize-none"
|
||||
rows="4"
|
||||
placeholder={$i18n.t('Enter system prompt')}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</Collapsible>
|
||||
|
||||
<hr class="my-2 border-gray-100 dark:border-gray-800" />
|
||||
|
||||
<div>
|
||||
<div class="mb-1.5 font-medium">{$i18n.t('Advanced Params')}</div>
|
||||
|
||||
<div>
|
||||
<AdvancedParams bind:params />
|
||||
<Collapsible title={$i18n.t('Advanced Params')} open={true}>
|
||||
<div class="text-sm mt-1.5" slot="content">
|
||||
<div>
|
||||
<AdvancedParams bind:params />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Collapsible>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user