From 7c8872beb9b9ec5b69969ff6bea1cc9ea48dfdab Mon Sep 17 00:00:00 2001 From: Hk-Gosuto Date: Tue, 5 Sep 2023 19:08:29 +0800 Subject: [PATCH] =?UTF-8?q?fix(12):=20=E4=BF=AE=E5=A4=8D=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/plugin.tsx | 4 +++- app/store/chat.ts | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/components/plugin.tsx b/app/components/plugin.tsx index 32fb0dbd6..fbaed29cc 100644 --- a/app/components/plugin.tsx +++ b/app/components/plugin.tsx @@ -297,7 +297,9 @@ export function PluginPage() { const allPlugins = pluginStore .getAll() - .filter((m) => !getLang() || m.lang === getLang()); + .filter( + (m) => !getLang() || m.lang === (getLang() == "cn" ? getLang() : "en"), + ); const [searchPlugins, setSearchPlugins] = useState([]); const [searchText, setSearchText] = useState(""); diff --git a/app/store/chat.ts b/app/store/chat.ts index 25658fb51..ccef540e0 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -317,7 +317,12 @@ export const useChatStore = create()( const pluginStore = usePluginStore.getState(); const allPlugins = pluginStore .getAll() - .filter((m) => (!getLang() || m.lang === getLang()) && m.enable); + .filter( + (m) => + (!getLang() || + m.lang === (getLang() == "cn" ? getLang() : "en")) && + m.enable, + ); // save user's and bot's message get().updateCurrentSession((session) => {