mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-21 16:26:49 +08:00
Merge remote-tracking branch 'upstream/main' into dev
# Conflicts: # app/components/chat.tsx # app/constant.ts # app/store/access.ts # app/utils/hooks.ts
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
import { useMemo } from "react";
|
||||
import { useAccessStore, useAppConfig } from "../store";
|
||||
import { collectModels } from "./model";
|
||||
import { collectModels, collectModelsWithDefaultModel } from "./model";
|
||||
|
||||
export function useAllModels() {
|
||||
const accessStore = useAccessStore();
|
||||
const configStore = useAppConfig();
|
||||
const models = useMemo(() => {
|
||||
return collectModels(
|
||||
return collectModelsWithDefaultModel(
|
||||
configStore.models,
|
||||
[configStore.customModels, accessStore.customModels].join(","),
|
||||
accessStore.defaultModel,
|
||||
).filter((m) => !configStore.dontUseModel.includes(m.name as any));
|
||||
}, [
|
||||
accessStore.customModels,
|
||||
|
||||
Reference in New Issue
Block a user