Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update conditional starter screen after cortex load #3227

Merged
merged 1 commit into from
Aug 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading