diff --git a/gui/src/components/gui/StepContainer.tsx b/gui/src/components/gui/StepContainer.tsx index 2885656ef..b21300cee 100644 --- a/gui/src/components/gui/StepContainer.tsx +++ b/gui/src/components/gui/StepContainer.tsx @@ -35,6 +35,7 @@ interface StepContainerProps { isFirst: boolean; isLast: boolean; index: number; + subtext?: string; } // #region styled components @@ -141,82 +142,90 @@ function StepContainer(props: StepContainerProps) { {(isHovered || typeof feedback !== "undefined") && !active && (
- {truncatedEarly && ( +
+ {props.subtext ?? ""} +
+
+ {truncatedEarly && ( + { + props.onContinueGeneration(); + }} + > + + + )} + + { - props.onContinueGeneration(); + props.onRetry(); }} > - - )} - - - { - props.onRetry(); - }} - > - - - {feedback === false || ( - - + { + sendFeedback(true); + }} + /> + + )} + {feedback === true || ( + + { + sendFeedback(false); + }} + /> + + )} + + { - sendFeedback(true); + props.onDelete(); }} /> - )} - {feedback === true || ( - - { - sendFeedback(false); - }} - /> - - )} - - { - props.onDelete(); - }} - /> - +
)} diff --git a/gui/src/pages/gui.tsx b/gui/src/pages/gui.tsx index a4ce15937..e255ad060 100644 --- a/gui/src/pages/gui.tsx +++ b/gui/src/pages/gui.tsx @@ -3,7 +3,6 @@ import { ChatBubbleOvalLeftIcon, CodeBracketSquareIcon, ExclamationTriangleIcon, - SparklesIcon, } from "@heroicons/react/24/outline"; import { JSONContent } from "@tiptap/react"; import { InputModifiers } from "core"; @@ -40,9 +39,9 @@ import { useWebviewListener } from "../hooks/useWebviewListener"; import { defaultModelSelector } from "../redux/selectors/modelSelectors"; import { clearLastResponse, + deleteMessage, newSession, setInactive, - deleteMessage, } from "../redux/slices/stateSlice"; import { setDialogEntryOn, @@ -58,7 +57,6 @@ import { } from "../util"; import { FREE_TRIAL_LIMIT_REQUESTS } from "../util/freeTrial"; import { getLocalStorage, setLocalStorage } from "../util/localStorage"; -import Logo from "../components/Logo"; const TopGuiDiv = styled.div` overflow-y: scroll; @@ -142,9 +140,11 @@ const ThreadHead = styled.div` margin: 18px 6px 0 6px; `; +const THREAD_AVATAR_SIZE = 15; + const ThreadAvatar = styled.div` - width: 32px; - height: 32px; + width: 24px; + height: 24px; border-radius: 50%; background-color: rgba(248, 248, 248, 0.75); color: #000; @@ -399,47 +399,22 @@ function GUI() { }} > {item.message.role === "user" ? ( -
- - - - -
- Continue - User -
-
- { - streamResponse( - editorState, - modifiers, - ideMessenger, - index, - ); - }} - isLastUserInput={isLastUserInput(index)} - isMainInput={false} - editorState={item.editorState} - contextItems={item.contextItems} - > -
+ { + streamResponse( + editorState, + modifiers, + ideMessenger, + index, + ); + }} + isLastUserInput={isLastUserInput(index)} + isMainInput={false} + editorState={item.editorState} + contextItems={item.contextItems} + > ) : (
- - - - -
- - {item.message.role} - - - {item.promptLogs?.[0]?.completionOptions?.model ?? - "Agent"} - -
-
{dispatch(deleteMessage(index))}} + onDelete={() => { + dispatch(deleteMessage(index)); + }} + subtext={ + item.promptLogs?.[0]?.completionOptions?.model ?? + "" + } />