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(() => {