fix: #289 #367 #353 #369 provide more error message info

This commit is contained in:
Yifei Zhang
2023-04-02 19:14:53 +00:00
parent 8d60a414f0
commit b44caeeefb
5 changed files with 25 additions and 6 deletions

View File

@@ -525,6 +525,8 @@ export function Chat(props: {
className={styles["chat-body"]}
ref={scrollRef}
onScroll={(e) => onChatBodyScroll(e.currentTarget)}
onMouseOver={() => inputRef.current?.blur()}
onTouchStart={() => inputRef.current?.blur()}
>
{messages.map((message, i) => {
const isUser = message.role === "user";
@@ -545,11 +547,7 @@ export function Chat(props: {
{Locale.Chat.Typing}
</div>
)}
<div
className={styles["chat-message-item"]}
onMouseOver={() => inputRef.current?.blur()}
onTouchStart={() => inputRef.current?.blur()}
>
<div className={styles["chat-message-item"]}>
{!isUser &&
!(message.preview || message.content.length === 0) && (
<div className={styles["chat-message-top-actions"]}>