From 5d056368913341bbb6caf30bd787c8d544cdb408 Mon Sep 17 00:00:00 2001 From: Patrick Erichsen Date: Sun, 13 Jul 2025 23:06:38 -0700 Subject: [PATCH] Update StepContainer.tsx --- gui/src/components/StepContainer/StepContainer.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/gui/src/components/StepContainer/StepContainer.tsx b/gui/src/components/StepContainer/StepContainer.tsx index 6f28333ed..91533848c 100644 --- a/gui/src/components/StepContainer/StepContainer.tsx +++ b/gui/src/components/StepContainer/StepContainer.tsx @@ -38,11 +38,13 @@ export default function StepContainer(props: StepContainerProps) { ); const uiConfig = useAppSelector(selectUIConfig); - const isUserOrSysMsg = + const isUserOrSysOrLastMsg = historyItemAfterThis?.message.role === "user" || - historyItemAfterThis?.message.role === "system"; + historyItemAfterThis?.message.role === "system" || + !historyItemAfterThis; - const showResponseActions = isUserOrSysMsg && !(isStreaming && props.isLast); + const showResponseActions = + isUserOrSysOrLastMsg && !(isStreaming && props.isLast); useEffect(() => { if (!isStreaming) { @@ -104,7 +106,7 @@ export default function StepContainer(props: StepContainerProps) { {props.isLast && } {/* We want to occupy space in the DOM regardless of whether the actions are visible to avoid jank on stream complete */} - {isUserOrSysMsg && ( + {isUserOrSysOrLastMsg && (
{showResponseActions && (