diff --git a/.changeset/brown-radios-do.md b/.changeset/brown-radios-do.md new file mode 100644 index 00000000..1957a9a2 --- /dev/null +++ b/.changeset/brown-radios-do.md @@ -0,0 +1,5 @@ +--- +"claude-dev": minor +--- + +disabling shift hint for now & improving tooltip behavior diff --git a/webview-ui/src/components/chat/ChatTextArea.tsx b/webview-ui/src/components/chat/ChatTextArea.tsx index bca0e812..cee7862c 100644 --- a/webview-ui/src/components/chat/ChatTextArea.tsx +++ b/webview-ui/src/components/chat/ChatTextArea.tsx @@ -268,7 +268,6 @@ const ChatTextArea = forwardRef( const [menuPosition, setMenuPosition] = useState(0) const [shownTooltipMode, setShownTooltipMode] = useState(null) const [pendingInsertions, setPendingInsertions] = useState([]) - const [showShiftDragTip, setShowShiftDragTip] = useState(false) const shiftHoldTimerRef = useRef(null) const [showUnsupportedFileError, setShowUnsupportedFileError] = useState(false) const unsupportedFileTimerRef = useRef(null) @@ -1024,45 +1023,6 @@ const ChatTextArea = forwardRef( } }, [showModelSelector]) - // Effect for Shift key hold detection - useEffect(() => { - const handleKeyDown = (event: KeyboardEvent) => { - if (event.key === "Shift" && !event.repeat) { - // Start timer only if Shift is pressed and not already held down - if (shiftHoldTimerRef.current === null) { - shiftHoldTimerRef.current = setTimeout(() => { - setShowShiftDragTip(true) - }, 250) // 250ms delay - } - } - } - - const handleKeyUp = (event: KeyboardEvent) => { - if (event.key === "Shift") { - // Clear timer and hide tip when Shift is released - if (shiftHoldTimerRef.current !== null) { - clearTimeout(shiftHoldTimerRef.current) - shiftHoldTimerRef.current = null - } - setShowShiftDragTip(false) - } - } - - // Add listeners - window.addEventListener("keydown", handleKeyDown) - window.addEventListener("keyup", handleKeyUp) - - // Cleanup listeners on component unmount - return () => { - window.removeEventListener("keydown", handleKeyDown) - window.removeEventListener("keyup", handleKeyUp) - // Clear any running timer on unmount - if (shiftHoldTimerRef.current !== null) { - clearTimeout(shiftHoldTimerRef.current) - } - } - }, []) // Empty dependency array ensures this runs only once on mount/unmount - // Function to show error message for unsupported files for drag and drop const showUnsupportedFileErrorMessage = () => { // Show error message for unsupported files @@ -1512,17 +1472,14 @@ const ChatTextArea = forwardRef( {/* ButtonGroup - always in DOM but visibility controlled */} ( )} - - {/* Shift Tip - always in DOM but visibility controlled */} -
- - Hold Shift to Drop Files - -
{/* Tooltip for Plan/Act toggle remains outside the conditional rendering */} { return (
- + { return (
- +