Kaynağa Gözat

Merge pull request #2947 from KeithHello/main

Yifei Zhang 1 yıl önce
ebeveyn
işleme
fd413c7b52
2 değiştirilmiş dosya ile 2 ekleme ve 7 silme
  1. 0 3
      app/store/chat.ts
  2. 2 4
      app/store/config.ts

+ 0 - 3
app/store/chat.ts

@@ -1,6 +1,3 @@
-import { create } from "zustand";
-import { persist } from "zustand/middleware";
-
 import { trimTopic } from "../utils";
 
 import Locale, { getLang } from "../locales";

+ 2 - 4
app/store/config.ts

@@ -70,7 +70,7 @@ export function limitNumber(
   max: number,
   defaultValue: number,
 ) {
-  if (typeof x !== "number" || isNaN(x)) {
+  if (isNaN(x)) {
     return defaultValue;
   }
 
@@ -133,9 +133,7 @@ export const useAppConfig = createPersistStore(
         .customModels.split(",")
         .filter((v) => !!v && v.length > 0)
         .map((m) => ({ name: m, available: true }));
-
-      const models = get().models.concat(customModels);
-      return models;
+      return get().models.concat(customModels);
     },
   }),
   {