Skip to content

Commit 406b366

Browse files
Update ChatTextArea.tsx (RooCodeInc#5586)
* Update ChatTextArea.tsx fix issue 5583 * refactor(ui): move TTS stop button to bottom control bar --------- Co-authored-by: Daniel Riccio <[email protected]>
1 parent 50598b2 commit 406b366

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -950,18 +950,6 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
950950
onScroll={() => updateHighlights()}
951951
/>
952952

953-
{isTtsPlaying && (
954-
<StandardTooltip content={t("chat:stopTts")}>
955-
<Button
956-
variant="ghost"
957-
size="icon"
958-
className="absolute top-0 right-0 opacity-25 hover:opacity-100 z-10"
959-
onClick={() => vscode.postMessage({ type: "stopTts" })}>
960-
<VolumeX className="size-4" />
961-
</Button>
962-
</StandardTooltip>
963-
)}
964-
965953
<div className="absolute top-1 right-1 z-30">
966954
<StandardTooltip content={t("chat:enhancePrompt")}>
967955
<button
@@ -1173,6 +1161,26 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
11731161
</div>
11741162

11751163
<div className={cn("flex", "items-center", "gap-0.5", "shrink-0")}>
1164+
{isTtsPlaying && (
1165+
<StandardTooltip content={t("chat:stopTts")}>
1166+
<button
1167+
aria-label={t("chat:stopTts")}
1168+
onClick={() => vscode.postMessage({ type: "stopTts" })}
1169+
className={cn(
1170+
"relative inline-flex items-center justify-center",
1171+
"bg-transparent border-none p-1.5",
1172+
"rounded-md min-w-[28px] min-h-[28px]",
1173+
"text-vscode-foreground opacity-85",
1174+
"transition-all duration-150",
1175+
"hover:opacity-100 hover:bg-[rgba(255,255,255,0.03)] hover:border-[rgba(255,255,255,0.15)]",
1176+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-vscode-focusBorder",
1177+
"active:bg-[rgba(255,255,255,0.1)]",
1178+
"cursor-pointer",
1179+
)}>
1180+
<VolumeX className="w-4 h-4" />
1181+
</button>
1182+
</StandardTooltip>
1183+
)}
11761184
<IndexingStatusBadge />
11771185
<StandardTooltip content={t("chat:addImages")}>
11781186
<button

0 commit comments

Comments
 (0)