Skip to content

Commit a550b4e

Browse files
committed
feat: update multimodal support by replacing CarbonImage with CarbonView and adjusting rendering logic
1 parent b1deb69 commit a550b4e

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

src/routes/models/+page.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { page } from "$app/state";
77
88
import CarbonHelpFilled from "~icons/carbon/help-filled";
9-
import CarbonImage from "~icons/carbon/image";
9+
import CarbonView from "~icons/carbon/view";
1010
import { useSettingsStore } from "$lib/stores/settings";
1111
interface Props {
1212
data: PageData;
@@ -72,14 +72,14 @@
7272
></div>
7373
{/if}
7474
<div class="flex items-center gap-1">
75-
{#if model.multimodal}
75+
{#if model.multimodal || $settings.multimodalOverrides?.[model.id]}
7676
<span
7777
title="This model is multimodal and supports image inputs natively."
7878
class="ml-auto flex size-[21px] items-center justify-center rounded-lg border border-blue-700 dark:border-blue-500"
7979
aria-label="Model is multimodal"
8080
role="img"
8181
>
82-
<CarbonImage class="text-xxs text-blue-700 dark:text-blue-500" />
82+
<CarbonView class="text-xxs text-blue-700 dark:text-blue-500" />
8383
</span>
8484
{/if}
8585
{#if model.reasoning}

src/routes/settings/(nav)/+layout.svelte

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import CarbonClose from "~icons/carbon/close";
88
import CarbonTextLongParagraph from "~icons/carbon/text-long-paragraph";
99
import CarbonChevronLeft from "~icons/carbon/chevron-left";
10+
import CarbonView from "~icons/carbon/view";
1011
1112
import UserIcon from "~icons/carbon/user";
1213
import type { LayoutData } from "../$types";
@@ -107,21 +108,32 @@
107108
<button
108109
type="button"
109110
onclick={() => goto(`${base}/settings/${model.id}`)}
110-
class="group flex h-9 w-full flex-none items-center gap-2 rounded-lg px-3 text-[13px] text-gray-600 hover:bg-gray-100
111+
class="group flex h-9 w-full flex-none items-center gap-1 rounded-lg px-3 text-[13px] text-gray-600 hover:bg-gray-100
111112
md:rounded-xl md:px-3
112113
{model.id === page.params.model ? '!bg-gray-100 !text-gray-800' : ''}"
113114
aria-label="Configure {model.displayName}"
114115
>
115116
<div class="mr-auto truncate">{model.displayName}</div>
116117

118+
{#if model.multimodal || $settings.multimodalOverrides?.[model.id]}
119+
<span
120+
title="Supports image inputs (multimodal)"
121+
class="grid size-[21px] place-items-center rounded-md border border-blue-700 dark:border-blue-500"
122+
aria-label="Model is multimodal"
123+
role="img"
124+
>
125+
<CarbonView class="text-xxs text-blue-700 dark:text-blue-500" />
126+
</span>
127+
{/if}
128+
117129
{#if $settings.customPrompts?.[model.id]}
118130
<CarbonTextLongParagraph
119131
class="size-6 rounded-md border border-gray-300 p-1 text-gray-800"
120132
/>
121133
{/if}
122134
{#if model.id === $settings.activeModel}
123135
<div
124-
class="rounded-md bg-black/90 px-2 py-1 text-[10px] font-semibold leading-none text-white"
136+
class="flex h-[21px] items-center rounded-md bg-black/90 px-2 text-[10px] font-semibold leading-none text-white"
125137
>
126138
Active
127139
</div>
@@ -133,7 +145,7 @@
133145
<button
134146
type="button"
135147
onclick={() => goto(`${base}/settings/application`)}
136-
class="group flex h-9 w-full flex-none items-center gap-2 rounded-lg px-3 text-[13px] text-gray-600 hover:bg-gray-100 max-md:order-first md:rounded-xl md:px-3
148+
class="group flex h-9 w-full flex-none items-center gap-1 rounded-lg px-3 text-[13px] text-gray-600 hover:bg-gray-100 max-md:order-first md:rounded-xl md:px-3
137149
{page.url.pathname === `${base}/settings/application` ? '!bg-gray-100 !text-gray-800' : ''}"
138150
aria-label="Configure application settings"
139151
>

0 commit comments

Comments
 (0)