remove border above input box
This commit is contained in:
parent
e4b7cbf33d
commit
bdf9f4de98
2 changed files with 17 additions and 18 deletions
|
|
@ -4,6 +4,6 @@
|
||||||
"trailingComma": "all",
|
"trailingComma": "all",
|
||||||
"semi": true,
|
"semi": true,
|
||||||
"singleQuote": false,
|
"singleQuote": false,
|
||||||
"bracketSpacing": false,
|
"bracketSpacing": true,
|
||||||
"plugins": ["prettier-plugin-tailwindcss"]
|
"plugins": ["prettier-plugin-tailwindcss"]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import {
|
||||||
useCallback,
|
useCallback,
|
||||||
useContext,
|
useContext,
|
||||||
useEffect,
|
useEffect,
|
||||||
useMemo,
|
|
||||||
useRef,
|
useRef,
|
||||||
useState,
|
useState,
|
||||||
} from "react";
|
} from "react";
|
||||||
|
|
@ -150,16 +149,16 @@ export function Chat() {
|
||||||
useHistory(dispatch);
|
useHistory(dispatch);
|
||||||
|
|
||||||
const scrollToBottom = useCallback(() => {
|
const scrollToBottom = useCallback(() => {
|
||||||
if (!topGuiDivRef.current) return
|
if (!topGuiDivRef.current) return;
|
||||||
const elem = topGuiDivRef.current;
|
const elem = topGuiDivRef.current;
|
||||||
elem.scrollTop = elem.scrollHeight - elem.clientHeight;
|
elem.scrollTop = elem.scrollHeight - elem.clientHeight;
|
||||||
|
|
||||||
setIsAtBottom(true);
|
setIsAtBottom(true);
|
||||||
}, [topGuiDivRef, setIsAtBottom])
|
}, [topGuiDivRef, setIsAtBottom]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (active) scrollToBottom()
|
if (active) scrollToBottom();
|
||||||
}, [active, scrollToBottom])
|
}, [active, scrollToBottom]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// Cmd + Backspace to delete current step
|
// Cmd + Backspace to delete current step
|
||||||
|
|
@ -314,7 +313,7 @@ export function Chat() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TopGuiDiv
|
<TopGuiDiv
|
||||||
className={`${state.history.length > 0 ? 'h-full' : ''}`}
|
className={`${state.history.length > 0 ? "h-full" : ""}`}
|
||||||
ref={topGuiDivRef}
|
ref={topGuiDivRef}
|
||||||
onScroll={handleScroll}
|
onScroll={handleScroll}
|
||||||
showScrollbar={state.config.ui?.showChatScrollbar || false}
|
showScrollbar={state.config.ui?.showChatScrollbar || false}
|
||||||
|
|
@ -371,7 +370,7 @@ export function Chat() {
|
||||||
: true
|
: true
|
||||||
: stepsOpen[index]!
|
: stepsOpen[index]!
|
||||||
}
|
}
|
||||||
onToggle={() => { }}
|
onToggle={() => {}}
|
||||||
>
|
>
|
||||||
<StepContainer
|
<StepContainer
|
||||||
index={index}
|
index={index}
|
||||||
|
|
@ -383,14 +382,14 @@ export function Chat() {
|
||||||
: stepsOpen[index]!
|
: stepsOpen[index]!
|
||||||
}
|
}
|
||||||
key={index}
|
key={index}
|
||||||
onUserInput={(input: string) => { }}
|
onUserInput={(input: string) => {}}
|
||||||
item={item}
|
item={item}
|
||||||
onReverse={() => { }}
|
onReverse={() => {}}
|
||||||
onRetry={() => {
|
onRetry={() => {
|
||||||
streamResponse(
|
streamResponse(
|
||||||
state.history[index - 1].editorState,
|
state.history[index - 1].editorState,
|
||||||
state.history[index - 1].modifiers ??
|
state.history[index - 1].modifiers ??
|
||||||
defaultInputModifiers,
|
defaultInputModifiers,
|
||||||
ideMessenger,
|
ideMessenger,
|
||||||
index - 1,
|
index - 1,
|
||||||
);
|
);
|
||||||
|
|
@ -427,8 +426,7 @@ export function Chat() {
|
||||||
/>
|
/>
|
||||||
</TopGuiDiv>
|
</TopGuiDiv>
|
||||||
|
|
||||||
|
<div className={`relative`}>
|
||||||
<div className={`relative ${state.history.length > 0 ? 'pt-1 border-0 border-t border-solid border-t-zinc-700' : ''}`}>
|
|
||||||
<div className="absolute -top-8 right-2 z-30">
|
<div className="absolute -top-8 right-2 z-30">
|
||||||
{ttsActive && (
|
{ttsActive && (
|
||||||
<StopButton
|
<StopButton
|
||||||
|
|
@ -463,10 +461,12 @@ export function Chat() {
|
||||||
sendInput(editorContent, modifiers);
|
sendInput(editorContent, modifiers);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<div style={{
|
<div
|
||||||
// opacity: active ? 0 : 1,
|
style={{
|
||||||
pointerEvents: active ? 'none' : 'auto',
|
// opacity: active ? 0 : 1,
|
||||||
}}>
|
pointerEvents: active ? "none" : "auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{state.history.length > 0 ? (
|
{state.history.length > 0 ? (
|
||||||
<div className="xs:inline mt-2 hidden">
|
<div className="xs:inline mt-2 hidden">
|
||||||
<NewSessionButton
|
<NewSessionButton
|
||||||
|
|
@ -516,4 +516,3 @@ export function Chat() {
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue