diff --git a/web/screens/Settings/Engines/RemoteEngineSettings.tsx b/web/screens/Settings/Engines/RemoteEngineSettings.tsx index 5396b86e0a..dc2948198c 100644 --- a/web/screens/Settings/Engines/RemoteEngineSettings.tsx +++ b/web/screens/Settings/Engines/RemoteEngineSettings.tsx @@ -115,6 +115,8 @@ const RemoteEngineSettings = ({ } }, [engine]) + if (!engine) return null + return (
diff --git a/web/screens/Thread/ThreadCenterPanel/ChatBody/OnDeviceStarterScreen/index.tsx b/web/screens/Thread/ThreadCenterPanel/ChatBody/OnDeviceStarterScreen/index.tsx index e05e793b5d..314f84b831 100644 --- a/web/screens/Thread/ThreadCenterPanel/ChatBody/OnDeviceStarterScreen/index.tsx +++ b/web/screens/Thread/ThreadCenterPanel/ChatBody/OnDeviceStarterScreen/index.tsx @@ -298,40 +298,46 @@ const OnDeviceStarterScreen = ({ isShowStarterScreen }: Props) => { key={rowIndex} className="my-2 flex items-center gap-4 md:gap-10" > - {row.map((remoteEngine) => { - const engineLogo = getLogoEngine( - remoteEngine as InferenceEngine + {row + .filter( + (e) => + engines?.[e as InferenceEngine]?.[0]?.type === + 'remote' ) + .map((remoteEngine) => { + const engineLogo = getLogoEngine( + remoteEngine as InferenceEngine + ) - return ( -
{ - setMainViewState(MainViewState.Settings) - setSelectedSetting( - remoteEngine as InferenceEngine - ) - }} - > - {engineLogo && ( - Engine logo - )} - -

- {getTitleByEngine( - remoteEngine as InferenceEngine + return ( +

{ + setMainViewState(MainViewState.Settings) + setSelectedSetting( + remoteEngine as InferenceEngine + ) + }} + > + {engineLogo && ( + Engine logo )} -

-
- ) - })} + +

+ {getTitleByEngine( + remoteEngine as InferenceEngine + )} +

+
+ ) + })}
) })}