From 84f89c569ab977523eb2f4b8650ea0f2ce0a190a Mon Sep 17 00:00:00 2001 From: Saoud Rizwan <7799382+saoudrizwan@users.noreply.github.com> Date: Mon, 5 Aug 2024 00:49:15 -0400 Subject: [PATCH] Fix effect dep array issue by using latest messages value instead of previous claudeAsk value --- webview-ui/src/components/ChatView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webview-ui/src/components/ChatView.tsx b/webview-ui/src/components/ChatView.tsx index fb3e653..9939c1b 100644 --- a/webview-ui/src/components/ChatView.tsx +++ b/webview-ui/src/components/ChatView.tsx @@ -132,7 +132,7 @@ const ChatView = ({ messages, isHidden, vscodeThemeName, showAnnouncement, hideA case "error": break case "api_req_started": - if (claudeAsk === "command_output") { + if (messages.at(-2)?.ask === "command_output") { // if the last ask is a command_output, and we receive an api_req_started, then that means the command has finished and we don't need input from the user anymore (in every other case, the user has to interact with input field or buttons to continue, which does the following automatically) setInputValue("") setTextAreaDisabled(true)