diff --git a/.changeset/calm-pears-fry.md b/.changeset/calm-pears-fry.md new file mode 100644 index 00000000000..bf53d43a7ff --- /dev/null +++ b/.changeset/calm-pears-fry.md @@ -0,0 +1,7 @@ +--- +"kilo-code": patch +--- + +The chat box is no longer cleared when clicking buttons + +Previously, if either of the buttons in the agent chat was clicked, the ChatTextArea would get cleared. Now, the ChatTextArea will only get cleared if a message is sent as part of the response. diff --git a/webview-ui/src/components/chat/ChatView.tsx b/webview-ui/src/components/chat/ChatView.tsx index ad53628041b..c73db4dfff9 100644 --- a/webview-ui/src/components/chat/ChatView.tsx +++ b/webview-ui/src/components/chat/ChatView.tsx @@ -658,12 +658,12 @@ const ChatViewComponent: React.ForwardRefRenderFunction handlePrimaryButtonClick(inputValue, selectedImages)}> + onClick={() => handlePrimaryButtonClick()}> {primaryButtonText} @@ -1931,7 +1931,7 @@ const ChatViewComponent: React.ForwardRefRenderFunction handleSecondaryButtonClick(inputValue, selectedImages)}> + onClick={() => handleSecondaryButtonClick()}> {isStreaming ? t("chat:cancel.title") : secondaryButtonText}