Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Hk-Gosuto
2024-07-21 09:36:44 +00:00
66 changed files with 8668 additions and 3792 deletions

View File

@@ -9,10 +9,10 @@ import styles from "./home.module.scss";
import BotIcon from "../icons/bot.svg";
import LoadingIcon from "../icons/three-dots.svg";
import { getClientApi, useMobileScreen } from "../utils";
import { useMobileScreen } from "../utils";
import dynamic from "next/dynamic";
import { ModelProvider, Path, SlotID } from "../constant";
import { Path, SlotID } from "../constant";
import { ErrorBoundary } from "./error";
import { getISOLang, getLang } from "../locales";
@@ -27,9 +27,8 @@ import { SideBar } from "./sidebar";
import { useAppConfig } from "../store/config";
import { AuthPage } from "./auth";
import { getClientConfig } from "../config/client";
import { ClientApi } from "../client/api";
import { type ClientApi, getClientApi } from "../client/api";
import { useAccessStore } from "../store";
import { identifyDefaultClaudeModel } from "../utils/checkers";
export function Loading(props: { noLogo?: boolean }) {
return (
@@ -178,7 +177,7 @@ function Screen() {
export function useLoadData() {
const config = useAppConfig();
var api: ClientApi = getClientApi(config.modelConfig.model);
const api: ClientApi = getClientApi(config.modelConfig.providerName);
useEffect(() => {
(async () => {