From 7186ead29790a1e2ec1b752ebfc1dd7ddf2ea66b Mon Sep 17 00:00:00 2001 From: Louis Date: Mon, 13 Jan 2025 12:08:28 +0700 Subject: [PATCH] chore: fix linter --- web/containers/ModelDropdown/index.tsx | 2 +- web/screens/Settings/Engines/RemoteEngineSettings.tsx | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/web/containers/ModelDropdown/index.tsx b/web/containers/ModelDropdown/index.tsx index ee8d192114..c5765ef889 100644 --- a/web/containers/ModelDropdown/index.tsx +++ b/web/containers/ModelDropdown/index.tsx @@ -185,7 +185,7 @@ const ModelDropdown = ({ setShowEngineListModel((prev) => [ ...prev, ...engineList - .filter((x) => (x.engine.api_key?.length ?? 0) > 0) + .filter((x) => (x.engine?.api_key?.length ?? 0) > 0) .map((e) => e.name), ]) }, [setShowEngineListModel, engineList]) diff --git a/web/screens/Settings/Engines/RemoteEngineSettings.tsx b/web/screens/Settings/Engines/RemoteEngineSettings.tsx index f69de0cfba..86a0ce4841 100644 --- a/web/screens/Settings/Engines/RemoteEngineSettings.tsx +++ b/web/screens/Settings/Engines/RemoteEngineSettings.tsx @@ -16,6 +16,7 @@ import { ScrollArea, Input, TextArea } from '@janhq/joi' import { useAtomValue } from 'jotai' +import { set } from 'lodash' import { ChevronRight } from 'lucide-react' import { twMerge } from 'tailwind-merge' @@ -23,9 +24,6 @@ import { updateEngine, useGetEngines } from '@/hooks/useEngineManagement' import { downloadedModelsAtom } from '@/helpers/atoms/Model.atom' -import { set } from 'lodash' -import { url } from 'inspector' - const RemoteEngineSettings = ({ engine: name, }: {