Skip to content

Commit 226647d

Browse files
committed
made scroll-to-bottom indicator more clear
1 parent 976f3b7 commit 226647d

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

cli/src/chat.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ export const Chat = ({
267267
}, [])
268268

269269
const [nextCtrlCWillExit, setNextCtrlCWillExit] = useState(false)
270+
const [scrollIndicatorHovered, setScrollIndicatorHovered] = useState(false)
270271

271272
const handleCtrlC = useCallback(() => {
272273
if (inputValue) {
@@ -863,9 +864,20 @@ export const Chat = ({
863864
{/* Center section - scroll indicator (always centered) */}
864865
<box style={{ flexShrink: 0 }}>
865866
{!isAtBottom && (
866-
<text onMouseDown={() => scrollToLatest()}>
867-
<span fg={theme.info} attributes={TextAttributes.BOLD}>
868-
867+
<text
868+
onMouseDown={() => scrollToLatest()}
869+
onMouseOver={() => setScrollIndicatorHovered(true)}
870+
onMouseOut={() => setScrollIndicatorHovered(false)}
871+
>
872+
<span
873+
fg={theme.info}
874+
attributes={
875+
scrollIndicatorHovered
876+
? TextAttributes.BOLD
877+
: TextAttributes.DIM
878+
}
879+
>
880+
{scrollIndicatorHovered ? '↓ Scroll to bottom ↓' : '↓'}
869881
</span>
870882
</text>
871883
)}

0 commit comments

Comments
 (0)