Skip to content

Commit

Permalink
feat: #170 auto scroll after retrying
Browse files Browse the repository at this point in the history
  • Loading branch information
Yidadaa committed Mar 29, 2023
1 parent e606810 commit 08f3c70
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/components/home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ export function Chat(props: {
chatStore
.onUserInput(messages[i].content)
.then(() => setIsLoading(false));
inputRef.current?.focus();
return;
}
}
Expand Down Expand Up @@ -319,7 +320,6 @@ export function Chat(props: {
const dom = latestMessageRef.current;
if (dom && !isIOS() && autoScroll) {
dom.scrollIntoView({
behavior: "smooth",
block: "end",
});
}
Expand Down Expand Up @@ -444,7 +444,7 @@ export function Chat(props: {
</div>
);
})}
<div ref={latestMessageRef} style={{ opacity: 0, height: "2em" }}>
<div ref={latestMessageRef} style={{ opacity: 0, height: "3em" }}>
-
</div>
</div>
Expand Down

0 comments on commit 08f3c70

Please sign in to comment.