From bbd77f2df3a56ea90ddcb981ca06554ad43a963f Mon Sep 17 00:00:00 2001 From: Roo Code Date: Fri, 29 Aug 2025 15:00:55 +0000 Subject: [PATCH] fix: add allowAttemptCompletion to AutoApproveSettings types and test --- webview-ui/src/components/settings/AutoApproveSettings.tsx | 4 ++++ .../components/settings/__tests__/AutoApproveToggle.spec.tsx | 1 + 2 files changed, 5 insertions(+) diff --git a/webview-ui/src/components/settings/AutoApproveSettings.tsx b/webview-ui/src/components/settings/AutoApproveSettings.tsx index 5ce44c747d..4e049f44df 100644 --- a/webview-ui/src/components/settings/AutoApproveSettings.tsx +++ b/webview-ui/src/components/settings/AutoApproveSettings.tsx @@ -30,6 +30,7 @@ type AutoApproveSettingsProps = HTMLAttributes & { alwaysAllowExecute?: boolean alwaysAllowFollowupQuestions?: boolean alwaysAllowUpdateTodoList?: boolean + allowAttemptCompletion?: boolean followupAutoApproveTimeoutMs?: number allowedCommands?: string[] allowedMaxRequests?: number | undefined @@ -55,6 +56,7 @@ type AutoApproveSettingsProps = HTMLAttributes & { | "allowedMaxCost" | "deniedCommands" | "alwaysAllowUpdateTodoList" + | "allowAttemptCompletion" > } @@ -74,6 +76,7 @@ export const AutoApproveSettings = ({ alwaysAllowFollowupQuestions, followupAutoApproveTimeoutMs = 60000, alwaysAllowUpdateTodoList, + allowAttemptCompletion, allowedCommands, allowedMaxRequests, allowedMaxCost, @@ -166,6 +169,7 @@ export const AutoApproveSettings = ({ alwaysAllowExecute={alwaysAllowExecute} alwaysAllowFollowupQuestions={alwaysAllowFollowupQuestions} alwaysAllowUpdateTodoList={alwaysAllowUpdateTodoList} + allowAttemptCompletion={allowAttemptCompletion} onToggle={(key, value) => setCachedStateField(key, value)} /> diff --git a/webview-ui/src/components/settings/__tests__/AutoApproveToggle.spec.tsx b/webview-ui/src/components/settings/__tests__/AutoApproveToggle.spec.tsx index 270ed305ea..eb7949ac4c 100644 --- a/webview-ui/src/components/settings/__tests__/AutoApproveToggle.spec.tsx +++ b/webview-ui/src/components/settings/__tests__/AutoApproveToggle.spec.tsx @@ -27,6 +27,7 @@ describe("AutoApproveToggle", () => { alwaysAllowExecute: true, alwaysAllowFollowupQuestions: false, alwaysAllowUpdateTodoList: true, + allowAttemptCompletion: false, onToggle: mockOnToggle, }