From 5cb5df26c426170b106db349aed2d917c2031f9d Mon Sep 17 00:00:00 2001 From: Priyash <38959321+priyashpatil@users.noreply.github.com> Date: Tue, 6 Aug 2024 05:11:02 +0530 Subject: [PATCH] Step control icons and layout adjustment (#1909) * fix: layout alignment, colors and update icons * feat: add always show step controls on last step --------- Co-authored-by: Nate Sesti <33237525+sestinj@users.noreply.github.com> --- gui/src/components/gui/StepContainer.tsx | 186 +++++++++++------------ 1 file changed, 91 insertions(+), 95 deletions(-) diff --git a/gui/src/components/gui/StepContainer.tsx b/gui/src/components/gui/StepContainer.tsx index 0d159b302..ca4ed0c72 100644 --- a/gui/src/components/gui/StepContainer.tsx +++ b/gui/src/components/gui/StepContainer.tsx @@ -1,10 +1,9 @@ import { - ArrowUturnLeftIcon, BarsArrowDownIcon, HandThumbDownIcon, HandThumbUpIcon, TrashIcon, - CubeIcon, + ArrowPathIcon, } from "@heroicons/react/24/outline"; import { ChatHistoryItem } from "core"; import { stripImages } from "core/llm/images"; @@ -15,7 +14,6 @@ import { defaultBorderRadius, lightGray, vscBackground, - vscButtonBackground, vscInputBackground, } from ".."; import { IdeMessengerContext } from "../../context/IdeMessenger"; @@ -123,103 +121,101 @@ function StepContainer(props: StepContainerProps) { /> )} - {(isHovered || typeof feedback !== "undefined") && !active && ( -
- {props.modelTitle && ( -
- - {props.modelTitle} -
-
- )} - {truncatedEarly && ( - { - props.onContinueGeneration(); - }} - > - - - )} - - - { - props.onRetry(); + {(props.isLast || isHovered || typeof feedback !== "undefined") && + !active && ( +
- +
{props.subtext}
+
+ + )} + + {truncatedEarly && ( + { + props.onContinueGeneration(); + }} + > + + + )} + + - - {feedback === false || ( - - { - sendFeedback(true); - }} - /> - - )} - {feedback === true || ( - - { - sendFeedback(false); - }} - /> - - )} - - { - props.onDelete(); + { + props.onRetry(); }} - /> - -
- )} + > + +
+ {feedback === false || ( + + { + sendFeedback(true); + }} + /> + + )} + {feedback === true || ( + + { + sendFeedback(false); + }} + /> + + )} + + { + props.onDelete(); + }} + /> + +
+ )}
);