From bdf9f4de98e8d5a18c30c0f2d964ecbe3beaba56 Mon Sep 17 00:00:00 2001 From: Nate Date: Tue, 5 Nov 2024 08:18:31 -0800 Subject: [PATCH] remove border above input box --- .prettierrc | 2 +- gui/src/pages/gui/Chat.tsx | 33 ++++++++++++++++----------------- 2 files changed, 17 insertions(+), 18 deletions(-) diff --git a/.prettierrc b/.prettierrc index 3bb28d3699..7b5484dd7e 100644 --- a/.prettierrc +++ b/.prettierrc @@ -4,6 +4,6 @@ "trailingComma": "all", "semi": true, "singleQuote": false, - "bracketSpacing": false, + "bracketSpacing": true, "plugins": ["prettier-plugin-tailwindcss"] } diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index a2e234c700..6ca0cc1675 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -12,7 +12,6 @@ import { useCallback, useContext, useEffect, - useMemo, useRef, useState, } from "react"; @@ -150,16 +149,16 @@ export function Chat() { useHistory(dispatch); const scrollToBottom = useCallback(() => { - if (!topGuiDivRef.current) return + if (!topGuiDivRef.current) return; const elem = topGuiDivRef.current; elem.scrollTop = elem.scrollHeight - elem.clientHeight; setIsAtBottom(true); - }, [topGuiDivRef, setIsAtBottom]) + }, [topGuiDivRef, setIsAtBottom]); useEffect(() => { - if (active) scrollToBottom() - }, [active, scrollToBottom]) + if (active) scrollToBottom(); + }, [active, scrollToBottom]); useEffect(() => { // Cmd + Backspace to delete current step @@ -314,7 +313,7 @@ export function Chat() { return ( <> 0 ? 'h-full' : ''}`} + className={`${state.history.length > 0 ? "h-full" : ""}`} ref={topGuiDivRef} onScroll={handleScroll} showScrollbar={state.config.ui?.showChatScrollbar || false} @@ -371,7 +370,7 @@ export function Chat() { : true : stepsOpen[index]! } - onToggle={() => { }} + onToggle={() => {}} > { }} + onUserInput={(input: string) => {}} item={item} - onReverse={() => { }} + onReverse={() => {}} onRetry={() => { streamResponse( state.history[index - 1].editorState, state.history[index - 1].modifiers ?? - defaultInputModifiers, + defaultInputModifiers, ideMessenger, index - 1, ); @@ -427,8 +426,7 @@ export function Chat() { /> - -
0 ? 'pt-1 border-0 border-t border-solid border-t-zinc-700' : ''}`}> +
{ttsActive && ( -
+
{state.history.length > 0 ? (
); } -