diff --git a/web/containers/DropdownListSidebar/index.tsx b/web/containers/DropdownListSidebar/index.tsx index b12263678..0dc23c71a 100644 --- a/web/containers/DropdownListSidebar/index.tsx +++ b/web/containers/DropdownListSidebar/index.tsx @@ -47,6 +47,20 @@ export default function DropdownListSidebar() { const setThreadModelParams = useSetAtom(setThreadModelParamsAtom) const { setMainViewState } = useMainViewState() + const [openAISettings, setOpenAISettings] = useState< + { api_key: string } | undefined + >(undefined) + const { readOpenAISettings, saveOpenAISettings } = useEngineSettings() + const totalRam = useAtomValue(totalRamAtom) + const usedRam = useAtomValue(usedRamAtom) + + useEffect(() => { + readOpenAISettings().then((settings) => { + setOpenAISettings(settings) + }) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) + const { recommendedModel, downloadedModels } = useRecommendedModel() const selectedName = diff --git a/web/containers/Layout/BottomBar/index.tsx b/web/containers/Layout/BottomBar/index.tsx index ec7a8081b..6e334b9ef 100644 --- a/web/containers/Layout/BottomBar/index.tsx +++ b/web/containers/Layout/BottomBar/index.tsx @@ -1,5 +1,3 @@ -import { useState } from 'react' - import { Badge, Button, diff --git a/web/screens/LocalServer/Logs.tsx b/web/screens/LocalServer/Logs.tsx index 97b625f40..589fbf64b 100644 --- a/web/screens/LocalServer/Logs.tsx +++ b/web/screens/LocalServer/Logs.tsx @@ -19,15 +19,150 @@ const Logs = () => { return (
- {logs.map((log, i) => {
- return (
-
- {log}
-
- )
- })}
-
+ {logs.length > 1 ? (
+
+ {logs.map((log, i) => {
+ return (
+
+ {log}
+
+ )
+ })}
+
+ ) : (
+ Empty logs
+