+
diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte
index 0f4fa6b605..1f4aedbfff 100644
--- a/src/lib/components/chat/ModelSelector/Selector.svelte
+++ b/src/lib/components/chat/ModelSelector/Selector.svelte
@@ -20,7 +20,6 @@
user,
MODEL_DOWNLOAD_POOL,
models,
- mobile,
temporaryChatEnabled,
settings,
config
@@ -76,6 +75,7 @@
let triggerElement: HTMLElement | null = null;
let contentElement: HTMLElement | null = null;
let dropdownPosition = { top: 0, left: 0, width: 0 };
+ const fullWidthBreakpoint = 640;
const portal = (node: HTMLElement) => {
document.body.appendChild(node);
@@ -94,6 +94,7 @@
const contentHeight = contentRect?.height ?? 0;
const spaceBelow = window.innerHeight - rect.bottom - 8;
const spaceAbove = rect.top - 8;
+ const fullWidth = window.innerWidth < fullWidthBreakpoint;
const resolvedPlacement =
placement === 'auto'
? contentHeight && spaceBelow < contentHeight && spaceAbove > spaceBelow
@@ -105,8 +106,8 @@
resolvedPlacement === 'top' && contentHeight
? rect.top - contentHeight - 2
: rect.bottom + 2,
- left: $mobile ? 8 : align === 'end' && contentWidth ? rect.right - contentWidth : rect.left,
- width: $mobile ? window.innerWidth - 16 : 0
+ left: fullWidth ? 8 : align === 'end' && contentWidth ? rect.right - contentWidth : rect.left,
+ width: fullWidth ? window.innerWidth - 16 : 0
};
};
@@ -641,7 +642,7 @@
}}
>
{triggerLabel}
-
+