Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Hk-Gosuto
2023-08-17 12:53:15 +08:00
4 changed files with 24 additions and 7 deletions

View File

@@ -7,6 +7,8 @@ import { useAccessStore } from "../store";
import Locale from "../locales";
import BotIcon from "../icons/bot.svg";
import { useEffect } from "react";
import { getClientConfig } from "../config/client";
export function AuthPage() {
const navigate = useNavigate();
@@ -14,6 +16,13 @@ export function AuthPage() {
const goHome = () => navigate(Path.Home);
useEffect(() => {
if (getClientConfig()?.isApp) {
navigate(Path.Settings);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
return (
<div className={styles["auth-page"]}>
<div className={`no-dark ${styles["auth-logo"]}`}>

View File

@@ -1151,9 +1151,9 @@ function _Chat() {
10,
);
chatStore.updateCurrentSession((session) => {
const m = session.messages.find(
(m) => m.id === message.id,
);
const m = session.mask.context
.concat(session.messages)
.find((m) => m.id === message.id);
if (m) {
m.content = newMessage;
}