Skip to content

Commit 53efc5a

Browse files
committed
fix: make reasoning picker don't cover textarea text
1 parent 7178d2b commit 53efc5a

1 file changed

Lines changed: 53 additions & 52 deletions

File tree

custom/ChatSurface.vue

Lines changed: 53 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -105,66 +105,67 @@
105105
transition: `transform ${agentTransitions.TRANSITION_DURATION}ms ease-in-out`
106106
}"
107107
>
108-
<textarea
109-
v-model="agentStore.userMessageInput"
110-
ref="textInput"
111-
@input="autoResize"
112-
:class="[
113-
'min-h-12 w-full resize-none overflow-hidden border text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
114-
agentStore.availableModes.length > 1 ? 'p-4 pr-12 pb-12' : 'p-4 pr-12',
115-
]"
116-
:placeholder="agentStore.userMessagePlaceholder"
117-
@keydown.enter.exact.prevent="sendMessage"
118-
/>
119-
<div
120-
v-if="agentStore.availableModes.length > 1"
121-
ref="modeMenu"
122-
class="absolute bottom-2 left-4"
123-
>
124-
<button
125-
aria-label="Select mode"
126-
class="flex px-2 py-1 items-center text-sm justify-center
127-
rounded-md bg-white text-lightListTableHeadingText
128-
transition-colors duration-200 hover:bg-gray-100
129-
dark:text-darkListTableHeadingText dark:bg-gray-700 dark:hover:bg-gray-800"
130-
:class="isModeMenuOpen ? 'bg-gray-100 dark:bg-gray-700' : ''"
131-
:disabled="agentStore.isResponseInProgress"
132-
title="Select mode"
133-
type="button"
134-
@click="toggleModeMenu"
135-
>
136-
{{ agentStore.activeModeName }}
137-
<IconAngleDownOutline
138-
class="w-4 h-4 ml-1"
139-
/>
140-
</button>
141-
108+
<div class="w-full border rounded-lg pb-8">
109+
<textarea
110+
v-model="agentStore.userMessageInput"
111+
ref="textInput"
112+
@input="autoResize"
113+
:class="[
114+
'min-h-12 px-4 pt-4 w-full resize-none overflow-hidden text-lightInputText dark:text-darkInputText rounded-md bg-transparent text-sm bg-gray-50 dark:bg-gray-700 dark:border-gray-600 focus:outline-none',
115+
]"
116+
:placeholder="agentStore.userMessagePlaceholder"
117+
@keydown.enter.exact.prevent="sendMessage"
118+
/>
142119
<div
143-
v-if="isModeMenuOpen"
144-
class="absolute bottom-full left-0 mb-2 min-w-40 overflow-hidden rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-600 dark:bg-gray-800"
120+
v-if="agentStore.availableModes.length > 1"
121+
ref="modeMenu"
122+
class="absolute bottom-2 left-4"
145123
>
146124
<button
147-
v-for="mode in agentStore.availableModes"
148-
:key="mode.name"
149-
class="block w-full px-3 py-2 text-left text-sm text-lightInputText transition-colors duration-150 hover:bg-gray-100 dark:text-darkInputText dark:hover:bg-gray-700"
150-
:class="mode.name === agentStore.activeModeName ? 'bg-gray-100 dark:bg-gray-700' : ''"
125+
aria-label="Select mode"
126+
class="flex px-2 py-1 items-center text-sm justify-center
127+
rounded-md bg-white text-lightListTableHeadingText
128+
transition-colors duration-200 hover:bg-gray-100
129+
dark:text-darkListTableHeadingText dark:bg-gray-700 dark:hover:bg-gray-800"
130+
:class="isModeMenuOpen ? 'bg-gray-100 dark:bg-gray-700' : ''"
131+
:disabled="agentStore.isResponseInProgress"
132+
title="Select mode"
151133
type="button"
152-
@click="selectMode(mode.name)"
134+
@click="toggleModeMenu"
153135
>
154-
{{ mode.name }}
136+
{{ agentStore.activeModeName }}
137+
<IconAngleDownOutline
138+
class="w-4 h-4 ml-1"
139+
/>
155140
</button>
141+
142+
<div
143+
v-if="isModeMenuOpen"
144+
class="absolute bottom-full left-0 mb-2 min-w-40 overflow-hidden rounded-md border border-gray-200 bg-white shadow-lg dark:border-gray-600 dark:bg-gray-800"
145+
>
146+
<button
147+
v-for="mode in agentStore.availableModes"
148+
:key="mode.name"
149+
class="block w-full px-3 py-2 text-left text-sm text-lightInputText transition-colors duration-150 hover:bg-gray-100 dark:text-darkInputText dark:hover:bg-gray-700"
150+
:class="mode.name === agentStore.activeModeName ? 'bg-gray-100 dark:bg-gray-700' : ''"
151+
type="button"
152+
@click="selectMode(mode.name)"
153+
>
154+
{{ mode.name }}
155+
</button>
156+
</div>
156157
</div>
158+
<Button
159+
class="absolute right-4 bottom-2 !p-0 h-9 w-9"
160+
@click="sendMessage"
161+
:disabled="!agentStore.trimmedUserMessage || agentStore.isResponseInProgress"
162+
>
163+
<IconArrowUpOutline
164+
class="w-8 h-8 p-1
165+
text-white"
166+
/>
167+
</Button>
157168
</div>
158-
<Button
159-
class="absolute right-4 bottom-2 !p-0 h-9 w-9"
160-
@click="sendMessage"
161-
:disabled="!agentStore.trimmedUserMessage || agentStore.isResponseInProgress"
162-
>
163-
<IconArrowUpOutline
164-
class="w-8 h-8 p-1
165-
text-white"
166-
/>
167-
</Button>
168169
</div>
169170
</div>
170171
</div>

0 commit comments

Comments
 (0)