fix: engine settings GUI - feature toggle (#1252)
## Description This feature is not fully implemented. Blocking issues: #1250
This commit is contained in:
parent
1ec8174700
commit
850a42cfb0
@ -1,4 +1,4 @@
|
||||
import React from 'react'
|
||||
import React, { useContext } from 'react'
|
||||
|
||||
import { getUserSpace, openFileExplorer, joinPath } from '@janhq/core'
|
||||
|
||||
@ -14,6 +14,8 @@ import DropdownListSidebar, {
|
||||
selectedModelAtom,
|
||||
} from '@/containers/DropdownListSidebar'
|
||||
|
||||
import { FeatureToggleContext } from '@/context/FeatureToggle'
|
||||
|
||||
import { useCreateNewThread } from '@/hooks/useCreateNewThread'
|
||||
|
||||
import { toSettingParams } from '@/utils/model_param'
|
||||
@ -35,6 +37,7 @@ const Sidebar: React.FC = () => {
|
||||
const selectedModel = useAtomValue(selectedModelAtom)
|
||||
const { updateThreadMetadata } = useCreateNewThread()
|
||||
const threadStates = useAtomValue(threadStatesAtom)
|
||||
const { experimentalFeatureEnabed } = useContext(FeatureToggleContext)
|
||||
|
||||
const activeModelParams = useAtomValue(getActiveThreadModelParamsAtom)
|
||||
const modelSettingParams = toSettingParams(activeModelParams)
|
||||
@ -197,7 +200,7 @@ const Sidebar: React.FC = () => {
|
||||
</div>
|
||||
</div>
|
||||
</CardSidebar>
|
||||
{Object.keys(modelSettingParams).length ? (
|
||||
{experimentalFeatureEnabed && Object.keys(modelSettingParams).length ? (
|
||||
<CardSidebar
|
||||
title="Engine"
|
||||
onRevealInFinderClick={onReviewInFinderClick}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user