From edd20addadec3e6faaa50902e1162603c89776df Mon Sep 17 00:00:00 2001 From: Aleksander Grygier Date: Wed, 26 Aug 2026 15:33:43 +0200 Subject: [PATCH] chore: Format --- .../ChatFormActionAddDropdown.svelte | 15 ++- .../ChatFormActionAddReasoningSubmenu.svelte | 116 +++++++++--------- .../app/models/ModelsSelectorOption.svelte | 2 +- 3 files changed, 68 insertions(+), 65 deletions(-) diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte index 657479fce2..3a246a0ba2 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddDropdown.svelte @@ -5,7 +5,11 @@ import * as DropdownMenu from '$lib/components/ui/dropdown-menu'; import * as Tooltip from '$lib/components/ui/tooltip'; import { cn } from '$lib/components/ui/utils'; - import { ATTACHMENT_FILE_ITEMS, ATTACHMENT_TOOLTIP_TEXT, ICON_CLASS_DEFAULT } from '$lib/constants'; + import { + ATTACHMENT_FILE_ITEMS, + ATTACHMENT_TOOLTIP_TEXT, + ICON_CLASS_DEFAULT + } from '$lib/constants'; import { getChatFormActionsContext } from '$lib/contexts'; import { AttachmentAction, AttachmentItemEnabledWhen } from '$lib/enums'; import { useAttachmentMenu } from '$lib/hooks/use-attachment-menu.svelte'; @@ -44,11 +48,10 @@ [AttachmentItemEnabledWhen.HAS_VIDEO_MODALITY]: { icon: Video, label: 'Video' } }; - const supportedModalities = $derived.by( - () => - ATTACHMENT_FILE_ITEMS.filter((item) => attachmentMenu.isItemEnabled(item.enabledWhen)) - .map((item) => FILE_MODALITY_ICONS[item.enabledWhen ?? '']) - .filter((modality) => modality !== undefined) + const supportedModalities = $derived.by(() => + ATTACHMENT_FILE_ITEMS.filter((item) => attachmentMenu.isItemEnabled(item.enabledWhen)) + .map((item) => FILE_MODALITY_ICONS[item.enabledWhen ?? '']) + .filter((modality) => modality !== undefined) ); diff --git a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddReasoningSubmenu.svelte b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddReasoningSubmenu.svelte index c2e676f3d5..197d6c2e59 100644 --- a/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddReasoningSubmenu.svelte +++ b/tools/ui/src/lib/components/app/chat/ChatForm/ChatFormActions/ChatFormActionAdd/ChatFormActionAddReasoningSubmenu.svelte @@ -9,67 +9,67 @@ - - {#if reasoning.isReasoningActive} - - {:else if reasoning.isOff} - - {:else} - - {/if} + + {#if reasoning.isReasoningActive} + + {:else if reasoning.isOff} + + {:else} + + {/if} - - Reasoning - - - {reasoning.currentEffort} - - - - - - {#each reasoning.levels as level (level.value)} - {@const tokenLabel = reasoning.tokenLabel(level)} - reasoning.select(level)} - > - {#if reasoning.isSelected(level)} - - {:else} -
- {/if} + Reasoning - {level.label} + + {reasoning.currentEffort} + + +
- {#if tokenLabel} - - {tokenLabel} - - {/if} + + {#each reasoning.levels as level (level.value)} + {@const tokenLabel = reasoning.tokenLabel(level)} + reasoning.select(level)} + > + {#if reasoning.isSelected(level)} + + {:else} +
+ {/if} - {#if level.hasInfo} - - - - + {level.label} - -

Maximum reasoning effort with extended context usage

-
-
- {/if} -
- {/each} -
-
+ {#if tokenLabel} + + {tokenLabel} + + {/if} + + {#if level.hasInfo} + + + + + + +

Maximum reasoning effort with extended context usage

+
+
+ {/if} + + {/each} + + diff --git a/tools/ui/src/lib/components/app/models/ModelsSelectorOption.svelte b/tools/ui/src/lib/components/app/models/ModelsSelectorOption.svelte index e83021b2b9..dd2b337cd6 100644 --- a/tools/ui/src/lib/components/app/models/ModelsSelectorOption.svelte +++ b/tools/ui/src/lib/components/app/models/ModelsSelectorOption.svelte @@ -86,7 +86,7 @@ class="flex-1" {hideOrgName} modelId={option.model} - modalities={modalities} + {modalities} {supportsThinking} showRawTooltip tags={option.tags}