clean up chatStore

This commit is contained in:
2024-12-27 18:02:14 +08:00
parent 092ac46c15
commit 66a6f263a5
9 changed files with 70 additions and 91 deletions

View File

@@ -1,8 +1,13 @@
import { ChatStore } from "@/types/chatstore";
import { Tr } from "@/translate";
import { useContext } from "react";
import { AppContext } from "@/pages/App";
const VersionHint = (props: { chatStore: ChatStore }) => {
const { chatStore } = props;
const VersionHint = () => {
const ctx = useContext(AppContext);
if (!ctx) return <div>error</div>;
const { chatStore } = ctx;
return (
<>
{chatStore.chatgpt_api_web_version < "v1.3.0" && (