From d84e6c6fb1f303c279b816e309fc9cd0f8455852 Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Thu, 1 Aug 2024 01:19:39 -0400 Subject: [PATCH] Remove text area height calculation --- package-lock.json | 4 ++-- package.json | 2 +- webview-ui/src/components/ChatView.tsx | 10 ++-------- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4056aa910..9a1b9364a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "claude-dev", - "version": "1.0.83", + "version": "1.0.84", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "claude-dev", - "version": "1.0.83", + "version": "1.0.84", "license": "MIT", "dependencies": { "@anthropic-ai/sdk": "^0.24.3", diff --git a/package.json b/package.json index 43dc4335f..353c9c8d5 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-dev", "displayName": "Claude Dev", "description": "Autonomous software engineer right in your IDE, capable of creating/editing files, executing commands, and more with your permission every step of the way.", - "version": "1.0.83", + "version": "1.0.84", "icon": "icon.png", "engines": { "vscode": "^1.84.0" diff --git a/webview-ui/src/components/ChatView.tsx b/webview-ui/src/components/ChatView.tsx index 646e115e8..c40ca410b 100644 --- a/webview-ui/src/components/ChatView.tsx +++ b/webview-ui/src/components/ChatView.tsx @@ -31,7 +31,6 @@ const ChatView = ({ messages, isHidden, vscodeThemeName, showAnnouncement, hideA const [inputValue, setInputValue] = useState("") const textAreaRef = useRef(null) - const [textAreaHeight, setTextAreaHeight] = useState(undefined) const [textAreaDisabled, setTextAreaDisabled] = useState(false) // we need to hold on to the ask because useEffect > lastMessage will always let us know when an ask comes in and handle it, but by the time handleMessage is called, the last message might not be the ask anymore (it could be a say that followed) @@ -275,12 +274,6 @@ const ChatView = ({ messages, isHidden, vscodeThemeName, showAnnouncement, hideA textAreaRef.current?.focus() }) - useEffect(() => { - if (textAreaRef.current && !textAreaHeight) { - setTextAreaHeight(textAreaRef.current.offsetHeight) - } - }, [textAreaHeight]) - useEffect(() => { const timer = setTimeout(() => { if (!isHidden && !textAreaDisabled && !enableButtons) { @@ -463,7 +456,8 @@ const ChatView = ({ messages, isHidden, vscodeThemeName, showAnnouncement, hideA right: 20, display: "flex", alignItems: "center", - ...(!!textAreaHeight ? { height: textAreaHeight, bottom: 12 } : { top: 0, bottom: 1.5 }), + top: 0, + bottom: 1.5, }}>