File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
app/components/Chat/Bubble Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -48,11 +48,20 @@ watch(
4848 }
4949 },
5050);
51+
52+ const iconRef = ref <HTMLElement | null >(null );
53+ const renderBelow = computed (() => {
54+ if (! iconRef .value ) return false ;
55+ const iconRect = iconRef .value .getBoundingClientRect ();
56+
57+ return iconRect .y < 240 ;
58+ });
5159 </script >
5260
5361<template >
5462 <div class =" relative chat-input-model" >
5563 <div
64+ ref =" iconRef"
5665 class =" flex items-center gap-2 cursor-pointer chat-input-model-button"
5766 @mousedown.stop.prevent =" popupVisible = !popupVisible"
5867 >
6372 <div
6473 v-if =" popupVisible && availableModels.length"
6574 ref =" popupRef"
66- class =" absolute bottom-full mb-2 left-0 bg-(--bg-color) border border-(--sub-color) rounded-lg shadow-lg w-60 max-h-60 z-10 chat-input-model-popup overflow-y-auto"
75+ class =" absolute my-2 left-0 bg-(--bg-color) border border-(--sub-color) rounded-lg shadow-lg w-60 max-h-60 z-10 chat-input-model-popup overflow-y-auto"
76+ :class =" renderBelow ? 'top-full' : 'bottom-full'"
6777 >
6878 <div
6979 v-for =" model in availableModels.sort((a, b) =>
You can’t perform that action at this time.
0 commit comments