|
10 | 10 |
|
11 | 11 | import { splitStream } from '$lib/utils'; |
12 | 12 | import Spinner from '$lib/components/common/Spinner.svelte'; |
13 | | - import Selector from '$lib/components/chat/ModelSelector/Selector.svelte'; |
| 13 | + |
14 | 14 |
|
15 | 15 | const i18n = getContext('i18n'); |
16 | 16 |
|
|
123 | 123 | <div class=" flex flex-col justify-between w-full overflow-y-auto h-full"> |
124 | 124 | <div class="mx-auto w-full md:px-0 h-full"> |
125 | 125 | <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 | | - |
146 | 126 | <div |
147 | 127 | class=" pt-0.5 pb-2.5 flex flex-col justify-between w-full flex-auto overflow-auto h-0" |
148 | 128 | id="messages-container" |
|
160 | 140 | </div> |
161 | 141 | </div> |
162 | 142 |
|
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"> |
165 | 156 | {#if !loading} |
166 | 157 | <button |
167 | 158 | 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