diff --git a/gui/src/components/StepContainer/ResponseActions.tsx b/gui/src/components/StepContainer/ResponseActions.tsx index 0dc09a438be..ac28afb9dc1 100644 --- a/gui/src/components/StepContainer/ResponseActions.tsx +++ b/gui/src/components/StepContainer/ResponseActions.tsx @@ -40,6 +40,7 @@ export default function ResponseActions({ (state) => state.session.contextPercentage, ); const isPruned = useAppSelector((state) => state.session.isPruned); + const historyLength = useAppSelector((state) => state.session.history.length); const ruleGenerationSupported = useMemo(() => { return selectedModel && modelSupportsNativeTools(selectedModel); }, [selectedModel]); @@ -50,7 +51,7 @@ export default function ResponseActions({ ? "text-warning" : "text-description-muted"; - const showLabel = isLast && (isPruned || percent >= 60); + const showLabel = isLast && historyLength >= 4 && (isPruned || percent >= 60); const compactConversation = useCompactConversation(); diff --git a/gui/src/components/mainInput/ContextStatus.tsx b/gui/src/components/mainInput/ContextStatus.tsx index 63be8f18000..d036c2e2900 100644 --- a/gui/src/components/mainInput/ContextStatus.tsx +++ b/gui/src/components/mainInput/ContextStatus.tsx @@ -64,13 +64,17 @@ const ContextStatus = () => { {history.length > 0 && (
- compactConversation(history.length - 1)} - > - Compact conversation - - {"\n"} + {history.length >= 4 && ( + <> + compactConversation(history.length - 1)} + > + Compact conversation + + {"\n"} + + )} {