From b984c25b8fe2dedfa3bd35da7b52a817d42df439 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Mon, 7 Jul 2025 10:58:40 -0700 Subject: [PATCH] cubic-feedback --- .../Lump/sections/tool-policies/ToolPolicyItem.tsx | 14 +++++++++----- gui/src/pages/gui/chat-tests/Chat.test.tsx | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx b/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx index 4a575a812..edccf3923 100644 --- a/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx +++ b/gui/src/components/mainInput/Lump/sections/tool-policies/ToolPolicyItem.tsx @@ -118,11 +118,15 @@ function ToolPolicyItem(props: ToolDropdownItemProps) {
{ - dispatch(toggleToolSetting(props.tool.function.name)); - e.stopPropagation(); - e.preventDefault(); - }} + onClick={ + disabled + ? undefined + : (e) => { + dispatch(toggleToolSetting(props.tool.function.name)); + e.stopPropagation(); + e.preventDefault(); + } + } > {disabled || policy === "disabled" ? ( <> diff --git a/gui/src/pages/gui/chat-tests/Chat.test.tsx b/gui/src/pages/gui/chat-tests/Chat.test.tsx index d1bae6d07..b0164a437 100644 --- a/gui/src/pages/gui/chat-tests/Chat.test.tsx +++ b/gui/src/pages/gui/chat-tests/Chat.test.tsx @@ -39,7 +39,7 @@ test("should be able to toggle modes", async () => { ); }); - // Check that it switched to Plan mode + // Check that it switched to Agent mode await getElementByText("Agent"); act(() => {