diff --git a/gui/src/components/StepContainer/ResponseActions.tsx b/gui/src/components/StepContainer/ResponseActions.tsx
index 4fda49ac8..673e05d9a 100644
--- a/gui/src/components/StepContainer/ResponseActions.tsx
+++ b/gui/src/components/StepContainer/ResponseActions.tsx
@@ -40,10 +40,22 @@ export default function ResponseActions({
const ideMessenger = useContext(IdeMessengerContext);
const currentSessionId = useAppSelector((state) => state.session.id);
const selectedModel = useAppSelector(selectSelectedChatModel);
+ const contextPercentage = useAppSelector(
+ (state) => state.session.contextPercentage,
+ );
+ const isPruned = useAppSelector((state) => state.session.isPruned);
const ruleGenerationSupported = useMemo(() => {
return selectedModel && modelSupportsTools(selectedModel);
}, [selectedModel]);
+ const percent = Math.round((contextPercentage ?? 0) * 100);
+ const buttonColorClass =
+ isLast && (isPruned || percent > 80)
+ ? "text-warning"
+ : "text-description-muted";
+
+ const showLabel = isLast && (isPruned || percent >= 60);
+
const onGenerateRule = () => {
dispatch(setShowDialog(true));
dispatch(setDialogMessage(