Skip to content

Commit

Permalink
remove border above input box
Browse files Browse the repository at this point in the history
  • Loading branch information
sestinj committed Nov 5, 2024
1 parent e4b7cbf commit bdf9f4d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"trailingComma": "all",
"semi": true,
"singleQuote": false,
"bracketSpacing": false,
"bracketSpacing": true,
"plugins": ["prettier-plugin-tailwindcss"]
}
33 changes: 16 additions & 17 deletions gui/src/pages/gui/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
useCallback,
useContext,
useEffect,
useMemo,
useRef,
useState,
} from "react";
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -314,7 +313,7 @@ export function Chat() {
return (
<>
<TopGuiDiv
className={`${state.history.length > 0 ? 'h-full' : ''}`}
className={`${state.history.length > 0 ? "h-full" : ""}`}
ref={topGuiDivRef}
onScroll={handleScroll}
showScrollbar={state.config.ui?.showChatScrollbar || false}
Expand Down Expand Up @@ -371,7 +370,7 @@ export function Chat() {
: true
: stepsOpen[index]!
}
onToggle={() => { }}
onToggle={() => {}}
>
<StepContainer
index={index}
Expand All @@ -383,14 +382,14 @@ export function Chat() {
: stepsOpen[index]!
}
key={index}
onUserInput={(input: string) => { }}
onUserInput={(input: string) => {}}
item={item}
onReverse={() => { }}
onReverse={() => {}}
onRetry={() => {
streamResponse(
state.history[index - 1].editorState,
state.history[index - 1].modifiers ??
defaultInputModifiers,
defaultInputModifiers,
ideMessenger,
index - 1,
);
Expand Down Expand Up @@ -427,8 +426,7 @@ export function Chat() {
/>
</TopGuiDiv>


<div className={`relative ${state.history.length > 0 ? 'pt-1 border-0 border-t border-solid border-t-zinc-700' : ''}`}>
<div className={`relative`}>
<div className="absolute -top-8 right-2 z-30">
{ttsActive && (
<StopButton
Expand Down Expand Up @@ -463,10 +461,12 @@ export function Chat() {
sendInput(editorContent, modifiers);
}}
/>
<div style={{
// opacity: active ? 0 : 1,
pointerEvents: active ? 'none' : 'auto',
}}>
<div
style={{
// opacity: active ? 0 : 1,
pointerEvents: active ? "none" : "auto",
}}
>
{state.history.length > 0 ? (
<div className="xs:inline mt-2 hidden">
<NewSessionButton
Expand Down Expand Up @@ -516,4 +516,3 @@ export function Chat() {
</>
);
}

0 comments on commit bdf9f4d

Please sign in to comment.