From a9a63ab5d98853445ba1f1eb34f0f233f7b00291 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Sun, 9 Feb 2025 13:07:08 +0700 Subject: [PATCH] fix: server log actions position (#4608) * fix: sever log actions position * chore: unused import --- web/containers/ServerLogs/index.tsx | 396 +++++++++--------- .../LoadModelError/index.tsx | 4 - 2 files changed, 201 insertions(+), 199 deletions(-) diff --git a/web/containers/ServerLogs/index.tsx b/web/containers/ServerLogs/index.tsx index 2e978bd23..b89a4c237 100644 --- a/web/containers/ServerLogs/index.tsx +++ b/web/containers/ServerLogs/index.tsx @@ -93,205 +93,211 @@ const ServerLogs = (props: ServerLogsProps) => { }, [listRef.current?.scrollHeight, isUserManuallyScrollingUp, logs]) return ( - - {withCopy && ( -
-
- - -
-
- )} -
- {logs.length > 0 ? ( - - {logs.slice(-limit).map((log, i) => { - return ( -

- {log} -

- ) - })} -
- ) : ( -
- - - - +
+ {withCopy && ( +
+
+ + +
)}
- + +
+ {logs.length > 0 ? ( + + {logs.slice(-limit).map((log, i) => { + return ( +

+ {log} +

+ ) + })} +
+ ) : ( +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ Empty logs +

+
+ )} +
+
+ ) } diff --git a/web/screens/Thread/ThreadCenterPanel/LoadModelError/index.tsx b/web/screens/Thread/ThreadCenterPanel/LoadModelError/index.tsx index ed0e6bcfc..0e679388f 100644 --- a/web/screens/Thread/ThreadCenterPanel/LoadModelError/index.tsx +++ b/web/screens/Thread/ThreadCenterPanel/LoadModelError/index.tsx @@ -2,9 +2,6 @@ import { EngineManager, InferenceEngine } from '@janhq/core' import { useAtomValue, useSetAtom } from 'jotai' import ErrorMessage from '@/containers/ErrorMessage' -import ModalTroubleShooting, { - modalTroubleShootingAtom, -} from '@/containers/ModalTroubleShoot' import { MainViewState } from '@/constants/screens' @@ -15,7 +12,6 @@ import { activeAssistantAtom } from '@/helpers/atoms/Assistant.atom' import { selectedSettingAtom } from '@/helpers/atoms/Setting.atom' const LoadModelError = () => { - const setModalTroubleShooting = useSetAtom(modalTroubleShootingAtom) const loadModelError = useAtomValue(loadModelErrorAtom) const setMainState = useSetAtom(mainViewStateAtom) const setSelectedSettingScreen = useSetAtom(selectedSettingAtom)