Skip to content

Commit c40ea7f

Browse files
committed
refac
1 parent 253f416 commit c40ea7f

1 file changed

Lines changed: 14 additions & 23 deletions

File tree

src/lib/components/playground/Completions.svelte

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
1111
import { splitStream } from '$lib/utils';
1212
import Spinner from '$lib/components/common/Spinner.svelte';
13-
import Selector from '$lib/components/chat/ModelSelector/Selector.svelte';
13+
1414
1515
const i18n = getContext('i18n');
1616
@@ -123,26 +123,6 @@
123123
<div class=" flex flex-col justify-between w-full overflow-y-auto h-full">
124124
<div class="mx-auto w-full md:px-0 h-full">
125125
<div class=" flex flex-col h-full px-4">
126-
<div class="flex flex-col justify-between mb-1 gap-1">
127-
<div class="flex flex-col gap-1 w-full">
128-
<div class="flex w-full">
129-
<div class="overflow-hidden w-full">
130-
<div class="max-w-full">
131-
<Selector
132-
placeholder={$i18n.t('Select a model')}
133-
items={$models.map((model) => ({
134-
value: model.id,
135-
label: model.name,
136-
model: model
137-
}))}
138-
bind:value={selectedModelId}
139-
/>
140-
</div>
141-
</div>
142-
</div>
143-
</div>
144-
</div>
145-
146126
<div
147127
class=" pt-0.5 pb-2.5 flex flex-col justify-between w-full flex-auto overflow-auto h-0"
148128
id="messages-container"
@@ -160,8 +140,19 @@
160140
</div>
161141
</div>
162142

163-
<div class="pb-3 flex justify-end">
164-
<div class="flex gap-2 shrink-0">
143+
<div class="pb-3 flex justify-between items-center">
144+
<div class="flex-1">
145+
<select
146+
class="bg-transparent border border-gray-100/30 dark:border-gray-850/30 rounded-lg py-1 px-2 -mx-0.5 text-sm outline-hidden w-full"
147+
bind:value={selectedModelId}
148+
>
149+
{#each $models as model}
150+
<option value={model.id} class="bg-gray-50 dark:bg-gray-700">{model.name}</option>
151+
{/each}
152+
</select>
153+
</div>
154+
155+
<div class="flex gap-2 shrink-0 ml-2">
165156
{#if !loading}
166157
<button
167158
class="px-3.5 py-1.5 text-sm font-medium bg-black hover:bg-gray-900 text-white dark:bg-white dark:text-black dark:hover:bg-gray-100 transition rounded-lg"

0 commit comments

Comments
 (0)