chore: update conditional starter screen after cortex load (#3227)
This commit is contained in:
parent
68714eeaf9
commit
4d3a97f1dc
@ -12,6 +12,7 @@ import ThreadCenterPanel from './ThreadCenterPanel'
|
|||||||
import EmptyModel from './ThreadCenterPanel/ChatBody/EmptyModel'
|
import EmptyModel from './ThreadCenterPanel/ChatBody/EmptyModel'
|
||||||
import ThreadRightPanel from './ThreadRightPanel'
|
import ThreadRightPanel from './ThreadRightPanel'
|
||||||
|
|
||||||
|
import { waitingForCortexAtom } from '@/helpers/atoms/App.atom'
|
||||||
import { downloadedModelsAtom } from '@/helpers/atoms/Model.atom'
|
import { downloadedModelsAtom } from '@/helpers/atoms/Model.atom'
|
||||||
import {
|
import {
|
||||||
isAnyRemoteModelConfiguredAtom,
|
isAnyRemoteModelConfiguredAtom,
|
||||||
@ -20,6 +21,7 @@ import {
|
|||||||
|
|
||||||
const ThreadScreen = () => {
|
const ThreadScreen = () => {
|
||||||
const downloadedModels = useAtomValue(downloadedModelsAtom)
|
const downloadedModels = useAtomValue(downloadedModelsAtom)
|
||||||
|
const waitingForCortex = useAtomValue(waitingForCortexAtom)
|
||||||
const isAnyRemoteModelConfigured = useAtomValue(
|
const isAnyRemoteModelConfigured = useAtomValue(
|
||||||
isAnyRemoteModelConfiguredAtom
|
isAnyRemoteModelConfiguredAtom
|
||||||
)
|
)
|
||||||
@ -36,6 +38,8 @@ const ThreadScreen = () => {
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [isAnyRemoteModelConfigured])
|
}, [isAnyRemoteModelConfigured])
|
||||||
|
|
||||||
|
if (waitingForCortex) return null
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="relative flex h-full w-full flex-1 overflow-x-hidden">
|
<div className="relative flex h-full w-full flex-1 overflow-x-hidden">
|
||||||
{!downloadedModels.length && !isAnyRemoteModelConfigured ? (
|
{!downloadedModels.length && !isAnyRemoteModelConfigured ? (
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user