Elffuss BraidHub

kikocis/continue public

Merge pull request #7677 from continuedev/dallin/con-3851-persist-response-actions-space

fix: HOTFIX response actions disappearing and causing jumping while streaming
Changesetc1bc7de194027aceb3574b0c1ab50090d9335aab09ad937b8fce68d4a1bd5d30
AuthorNate Sesti <33237525+sestinj@users.noreply.github.com> · 2025-09-09 21:38 -07:00
CommitterGitHub <noreply@github.com> · 2025-09-09 21:38 -07:00
Parents672c3e053fed, b1f043ba350b

Browse the files at this changeset

1 file changed

modified gui/src/components/StepContainer/StepContainer.tsx +8 −21
@@ -22,9 +22,6 @@
2222 const dispatch = useDispatch();
2323 const [isTruncated, setIsTruncated] = useState(false);
2424 const isStreaming = useAppSelector((state) => state.session.isStreaming);
25- const historyItemAfterThis = useAppSelector(
26- (state) => state.session.history[props.index + 1],
27- );
2825 const uiConfig = useAppSelector(selectUIConfig);
2926
3027 // Calculate dimming and indicator state based on latest summary index
@@ -34,22 +31,12 @@
3431 const isLatestSummary =
3532 latestSummaryIndex !== -1 && props.index === latestSummaryIndex;
3633
37- const isNextMsgAssistantOrThinking =
38- historyItemAfterThis?.message.role === "assistant" ||
39- historyItemAfterThis?.message.role === "thinking" ||
40- historyItemAfterThis?.message.role === "tool";
41-
42- const shouldRenderResponseAction = () => {
43- if (isNextMsgAssistantOrThinking) {
44- return false;
45- }
46-
47- if (!historyItemAfterThis) {
48- return !props.item.toolCallStates;
49- }
50-
51- return true;
52- };
34+ const historyItemAfterThis = useAppSelector(
35+ (state) => state.session.history[props.index + 1],
36+ );
37+ const showResponseActions =
38+ (props.isLast || historyItemAfterThis?.message.role === "user") &&
39+ !(props.isLast && (isStreaming || props.item.toolCallStates));
5340
5441 useEffect(() => {
5542 if (!isStreaming) {
@@ -110,9 +97,9 @@
11097 {props.isLast && <ThinkingIndicator historyItem={props.item} />}
11198 </div>
11299
113- {shouldRenderResponseAction() && !isStreaming && (
100+ {showResponseActions && (
114101 <div
115- className={`mt-2 h-7 transition-opacity duration-300 ease-in-out ${isBeforeLatestSummary ? "opacity-35" : ""}`}
102+ className={`mt-2 h-7 transition-opacity duration-300 ease-in-out ${isBeforeLatestSummary || isStreaming ? "opacity-35" : ""} ${isStreaming && "pointer-events-none cursor-not-allowed"}`}
116103 >
117104 <ResponseActions
118105 isTruncated={isTruncated}