Skip to content

Commit 08f3c70

Browse files
committedMar 29, 2023
feat: #170 auto scroll after retrying
1 parent e606810 commit 08f3c70

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎app/components/home.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@ export function Chat(props: {
275275
chatStore
276276
.onUserInput(messages[i].content)
277277
.then(() => setIsLoading(false));
278+
inputRef.current?.focus();
278279
return;
279280
}
280281
}
@@ -319,7 +320,6 @@ export function Chat(props: {
319320
const dom = latestMessageRef.current;
320321
if (dom && !isIOS() && autoScroll) {
321322
dom.scrollIntoView({
322-
behavior: "smooth",
323323
block: "end",
324324
});
325325
}
@@ -444,7 +444,7 @@ export function Chat(props: {
444444
</div>
445445
);
446446
})}
447-
<div ref={latestMessageRef} style={{ opacity: 0, height: "2em" }}>
447+
<div ref={latestMessageRef} style={{ opacity: 0, height: "3em" }}>
448448
-
449449
</div>
450450
</div>

0 commit comments

Comments
 (0)