Skip to content

Commit 0ffb7dd

Browse files
pashpashpashCline Evaluation
andauthored
changeset (RooCodeInc#3241)
Co-authored-by: Cline Evaluation <[email protected]>
1 parent e9ce384 commit 0ffb7dd

File tree

4 files changed

+8
-76
lines changed

4 files changed

+8
-76
lines changed

.changeset/brown-radios-do.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"claude-dev": minor
3+
---
4+
5+
disabling shift hint for now & improving tooltip behavior

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

Lines changed: 1 addition & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
268268
const [menuPosition, setMenuPosition] = useState(0)
269269
const [shownTooltipMode, setShownTooltipMode] = useState<ChatSettings["mode"] | null>(null)
270270
const [pendingInsertions, setPendingInsertions] = useState<string[]>([])
271-
const [showShiftDragTip, setShowShiftDragTip] = useState(false)
272271
const shiftHoldTimerRef = useRef<NodeJS.Timeout | null>(null)
273272
const [showUnsupportedFileError, setShowUnsupportedFileError] = useState(false)
274273
const unsupportedFileTimerRef = useRef<NodeJS.Timeout | null>(null)
@@ -1024,45 +1023,6 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
10241023
}
10251024
}, [showModelSelector])
10261025

1027-
// Effect for Shift key hold detection
1028-
useEffect(() => {
1029-
const handleKeyDown = (event: KeyboardEvent) => {
1030-
if (event.key === "Shift" && !event.repeat) {
1031-
// Start timer only if Shift is pressed and not already held down
1032-
if (shiftHoldTimerRef.current === null) {
1033-
shiftHoldTimerRef.current = setTimeout(() => {
1034-
setShowShiftDragTip(true)
1035-
}, 250) // 250ms delay
1036-
}
1037-
}
1038-
}
1039-
1040-
const handleKeyUp = (event: KeyboardEvent) => {
1041-
if (event.key === "Shift") {
1042-
// Clear timer and hide tip when Shift is released
1043-
if (shiftHoldTimerRef.current !== null) {
1044-
clearTimeout(shiftHoldTimerRef.current)
1045-
shiftHoldTimerRef.current = null
1046-
}
1047-
setShowShiftDragTip(false)
1048-
}
1049-
}
1050-
1051-
// Add listeners
1052-
window.addEventListener("keydown", handleKeyDown)
1053-
window.addEventListener("keyup", handleKeyUp)
1054-
1055-
// Cleanup listeners on component unmount
1056-
return () => {
1057-
window.removeEventListener("keydown", handleKeyDown)
1058-
window.removeEventListener("keyup", handleKeyUp)
1059-
// Clear any running timer on unmount
1060-
if (shiftHoldTimerRef.current !== null) {
1061-
clearTimeout(shiftHoldTimerRef.current)
1062-
}
1063-
}
1064-
}, []) // Empty dependency array ensures this runs only once on mount/unmount
1065-
10661026
// Function to show error message for unsupported files for drag and drop
10671027
const showUnsupportedFileErrorMessage = () => {
10681028
// Show error message for unsupported files
@@ -1512,17 +1472,14 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
15121472
{/* ButtonGroup - always in DOM but visibility controlled */}
15131473
<ButtonGroup
15141474
style={{
1515-
opacity: showShiftDragTip ? 0 : 1,
1516-
pointerEvents: showShiftDragTip ? "none" : "auto",
15171475
position: "absolute",
15181476
top: 0,
15191477
left: 0,
15201478
right: 0,
15211479
transition: "opacity 0.3s ease-in-out",
1522-
transitionDelay: showShiftDragTip ? "0s" : "0.2s",
15231480
width: "100%",
15241481
height: "100%",
1525-
zIndex: showShiftDragTip ? 0 : 1,
1482+
zIndex: 6,
15261483
}}>
15271484
<Tooltip tipText="Add Context" style={{ left: 0 }}>
15281485
<VSCodeButton
@@ -1592,36 +1549,6 @@ const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
15921549
)}
15931550
</ModelContainer>
15941551
</ButtonGroup>
1595-
1596-
{/* Shift Tip - always in DOM but visibility controlled */}
1597-
<div
1598-
style={{
1599-
display: "flex",
1600-
justifyContent: "flex-start", // Left align horizontally
1601-
alignItems: "center", // Center vertically
1602-
height: "100%", // Fill the container height
1603-
padding: "4px 0", // Add padding to match button group height
1604-
boxSizing: "border-box", // Include padding in height calculation
1605-
opacity: showShiftDragTip ? 1 : 0,
1606-
pointerEvents: showShiftDragTip ? "auto" : "none",
1607-
position: "absolute",
1608-
top: 0,
1609-
left: 0,
1610-
right: 0,
1611-
transition: "opacity 0.3s ease-in-out",
1612-
transitionDelay: showShiftDragTip ? "0.2s" : "0s",
1613-
width: "100%",
1614-
zIndex: showShiftDragTip ? 1 : 0,
1615-
}}>
1616-
<span
1617-
style={{
1618-
fontSize: "10px",
1619-
color: "var(--vscode-descriptionForeground)",
1620-
whiteSpace: "nowrap",
1621-
}}>
1622-
Hold Shift to Drop Files
1623-
</span>
1624-
</div>
16251552
</div>
16261553
{/* Tooltip for Plan/Act toggle remains outside the conditional rendering */}
16271554
<Tooltip

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const ServersToggleModal: React.FC = () => {
4444
return (
4545
<div ref={modalRef}>
4646
<div ref={buttonRef} className="inline-flex min-w-0 max-w-full">
47-
<Tooltip tipText="Manage MCP Servers">
47+
<Tooltip tipText="Manage MCP Servers" visible={isVisible ? false : undefined}>
4848
<VSCodeButton
4949
appearance="icon"
5050
aria-label="MCP Servers"

webview-ui/src/components/cline-rules/ClineRulesToggleModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const ClineRulesToggleModal: React.FC = () => {
6262
return (
6363
<div ref={modalRef}>
6464
<div ref={buttonRef} className="inline-flex min-w-0 max-w-full">
65-
<Tooltip tipText="Manage Cline Rules">
65+
<Tooltip tipText="Manage Cline Rules" visible={isVisible ? false : undefined}>
6666
<VSCodeButton
6767
appearance="icon"
6868
aria-label="Cline Rules"

0 commit comments

Comments
 (0)