From c5666316f10f35eb39a91d981b99f273550a9cc8 Mon Sep 17 00:00:00 2001 From: Chris Hasson Date: Fri, 25 Jul 2025 15:13:37 -0700 Subject: [PATCH] fix(chat): Cancel auto-approve timer when editing follow-up suggestion Fixes: https://github.com/Kilo-Org/kilocode/issues/1262 --- .changeset/kind-horses-sniff.md | 5 +++++ webview-ui/src/components/chat/FollowUpSuggest.tsx | 3 +++ 2 files changed, 8 insertions(+) create mode 100644 .changeset/kind-horses-sniff.md diff --git a/.changeset/kind-horses-sniff.md b/.changeset/kind-horses-sniff.md new file mode 100644 index 00000000000..9a6afbd167e --- /dev/null +++ b/.changeset/kind-horses-sniff.md @@ -0,0 +1,5 @@ +--- +"kilo-code": patch +--- + +Cancel auto-approve timer when editing follow-up suggestion diff --git a/webview-ui/src/components/chat/FollowUpSuggest.tsx b/webview-ui/src/components/chat/FollowUpSuggest.tsx index 1ffe31bbcba..3f5bc3a0171 100644 --- a/webview-ui/src/components/chat/FollowUpSuggest.tsx +++ b/webview-ui/src/components/chat/FollowUpSuggest.tsx @@ -134,6 +134,9 @@ export const FollowUpSuggest = ({ className="absolute top-0 right-0 opacity-0 group-hover:opacity-100 transition-opacity" onClick={(e) => { e.stopPropagation() + // Cancel the auto-approve timer when edit button is clicked + setSuggestionSelected(true) + onCancelAutoApproval?.() // Simulate shift-click by directly calling the handler with shiftKey=true. onSuggestionClick?.(suggestion, { ...e, shiftKey: true }) }}>