diff --git a/web/containers/DropdownListSidebar/index.tsx b/web/containers/DropdownListSidebar/index.tsx index 31753c39c..eb867f54e 100644 --- a/web/containers/DropdownListSidebar/index.tsx +++ b/web/containers/DropdownListSidebar/index.tsx @@ -42,7 +42,12 @@ import { export const selectedModelAtom = atom(undefined) -const DropdownListSidebar: React.FC = () => { +// TODO: Move all of the unscoped logics outside of the component +const DropdownListSidebar = ({ + strictedThread = true, +}: { + strictedThread?: boolean +}) => { const activeThread = useAtomValue(activeThreadAtom) const threadStates = useAtomValue(threadStatesAtom) const [selectedModel, setSelectedModel] = useAtom(selectedModelAtom) @@ -152,7 +157,7 @@ const DropdownListSidebar: React.FC = () => { ] ) - if (!activeThread) { + if (strictedThread && !activeThread) { return null } diff --git a/web/screens/LocalServer/index.tsx b/web/screens/LocalServer/index.tsx index f752baf2d..6e606a952 100644 --- a/web/screens/LocalServer/index.tsx +++ b/web/screens/LocalServer/index.tsx @@ -59,7 +59,7 @@ const portAtom = atom('1337') const LocalServerScreen = () => { const [errorRangePort, setErrorRangePort] = useState(false) const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom) - const showing = useAtomValue(showRightSideBarAtom) + const showRightSideBar = useAtomValue(showRightSideBarAtom) const activeModelParams = useAtomValue(getActiveThreadModelParamsAtom) const modelEngineParams = toSettingParams(activeModelParams) @@ -117,7 +117,7 @@ const LocalServerScreen = () => {