Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion gui/src/components/StepContainer/ResponseActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand All @@ -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();

Expand Down
18 changes: 11 additions & 7 deletions gui/src/components/mainInput/ContextStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,17 @@ const ContextStatus = () => {
{history.length > 0 && (
<div className="flex flex-col gap-1 whitespace-pre">
<div>
<span
className="hover:text-link inline-block cursor-pointer underline"
onClick={() => compactConversation(history.length - 1)}
>
Compact conversation
</span>
{"\n"}
{history.length >= 4 && (
<>
<span
className="hover:text-link inline-block cursor-pointer underline"
onClick={() => compactConversation(history.length - 1)}
>
Compact conversation
</span>
{"\n"}
</>
)}
<span
className="hover:text-link inline-block cursor-pointer underline"
onClick={() => {
Expand Down
Loading