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

closed #2176

Closed
Closed

closed #2176

Show file tree
Hide file tree
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
9 changes: 9 additions & 0 deletions src/components/App/UniverseQuestion/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import HelpIcon from '~/components/Icons/HelpIcon'
import { useAiSummaryStore } from '~/stores/useAiSummaryStore'
import { useAppStore } from '~/stores/useAppStore'
import { useDataStore } from '~/stores/useDataStore'
import { useFeatureFlagStore } from '~/stores/useFeatureFlagStore'
import { useUserStore } from '~/stores/useUserStore'
import { colors } from '~/utils/colors'

Expand Down Expand Up @@ -60,6 +61,10 @@ export const UniverseQuestion = () => {
}
}

const { chatInterfaceFeatureFlag } = useFeatureFlagStore((s) => ({
chatInterfaceFeatureFlag: s.chatInterfaceFeatureFlag,
}))

const handleSeedQuestionClick = async (seedQuestion: string) => {
setQuestion(seedQuestion)
await handleSubmitQuestion(seedQuestion)
Expand Down Expand Up @@ -87,6 +92,10 @@ export const UniverseQuestion = () => {

const isValidText = !!question && question.trim().length > 0

if (!chatInterfaceFeatureFlag) {
return null
}

return (
<Wrapper>
Ideas have shapes
Expand Down
2 changes: 1 addition & 1 deletion src/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@
}

ws.onmessage = (event) => {
console.log('Message from server:', event.data)

Check warning on line 298 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement

Check warning on line 298 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / craco-build-run

Unexpected console statement

const data = JSON.parse(event.data)

Expand All @@ -317,7 +317,7 @@
}

ws.onclose = () => {
console.log('WebSocket connection closed')

Check warning on line 320 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / eslint-run

Unexpected console statement

Check warning on line 320 in src/components/App/index.tsx

View workflow job for this annotation

GitHub Actions / craco-build-run

Unexpected console statement
}
}, [runningProjectId, setRunningProjectMessages])

Expand All @@ -340,7 +340,7 @@
<Wrapper direction="row">
<FormProvider {...form}>
<LazyMainToolbar />
{!universeQuestionIsOpen && <LazySideBar />}
{chatInterfaceFeatureFlag ? !universeQuestionIsOpen && <LazySideBar /> : <LazySideBar />}
<LazyUniverse />
<Overlay />
<AppBar />
Expand Down
Loading