import { Button } from '@janhq/uikit' import { useAtom, useAtomValue } from 'jotai' import { ExternalLinkIcon } from 'lucide-react' import { twMerge } from 'tailwind-merge' import CardSidebar from '@/containers/CardSidebar' import DropdownListSidebar from '@/containers/DropdownListSidebar' import { getConfigurationsData } from '@/utils/componentSettings' import { toRuntimeParams, toSettingParams } from '@/utils/modelParam' import EngineSetting from '../Chat/EngineSetting' import ModelSetting from '../Chat/ModelSetting' import settingComponentBuilder from '../Chat/ModelSetting/settingComponentBuilder' import { showRightSideBarAtom } from '../Chat/Sidebar' import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom' import { getActiveThreadModelParamsAtom } from '@/helpers/atoms/Thread.atom' const LocalServerScreen = () => { const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom) const showing = useAtomValue(showRightSideBarAtom) const activeModelParams = useAtomValue(getActiveThreadModelParamsAtom) const modelEngineParams = toSettingParams(activeModelParams) const modelRuntimeParams = toRuntimeParams(activeModelParams) const componentDataEngineSetting = getConfigurationsData(modelEngineParams) const componentDataRuntimeSetting = getConfigurationsData(modelRuntimeParams) return (
{/* Left SideBar */}

Server Options

Start an OpenAI-compatible local HTTP server.

{/* Middle Bar */}

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Eius iusto aspernatur blanditiis, culpa harum ex hic atque quae tempora eaque obcaecati voluptas nulla error repellat aliquam minima laborum corporis fuga.

{/* Right bar */}
{componentDataRuntimeSetting.length !== 0 && (
)} {componentDataEngineSetting.filter( (x) => x.name === 'prompt_template' ).length !== 0 && (
{settingComponentBuilder(componentDataEngineSetting, true)}
)} {componentDataEngineSetting.length !== 0 && (
)}
) } export default LocalServerScreen