Skip to content

Commit

Permalink
chore: update conditional starter screen after cortex load (janhq#3227)
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur authored Aug 2, 2024
1 parent 68714ee commit 4d3a97f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions web/screens/Thread/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import ThreadCenterPanel from './ThreadCenterPanel'
import EmptyModel from './ThreadCenterPanel/ChatBody/EmptyModel'
import ThreadRightPanel from './ThreadRightPanel'

import { waitingForCortexAtom } from '@/helpers/atoms/App.atom'
import { downloadedModelsAtom } from '@/helpers/atoms/Model.atom'
import {
isAnyRemoteModelConfiguredAtom,
Expand All @@ -20,6 +21,7 @@ import {

const ThreadScreen = () => {
const downloadedModels = useAtomValue(downloadedModelsAtom)
const waitingForCortex = useAtomValue(waitingForCortexAtom)
const isAnyRemoteModelConfigured = useAtomValue(
isAnyRemoteModelConfiguredAtom
)
Expand All @@ -36,6 +38,8 @@ const ThreadScreen = () => {
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [isAnyRemoteModelConfigured])

if (waitingForCortex) return null

return (
<div className="relative flex h-full w-full flex-1 overflow-x-hidden">
{!downloadedModels.length && !isAnyRemoteModelConfigured ? (
Expand Down

0 comments on commit 4d3a97f

Please sign in to comment.