fix: copy stream tooltip and hide section when no params setting
This commit is contained in:
parent
547f28b58e
commit
13ac421cdd
@ -72,7 +72,7 @@ export const presetConfiguration: Record<string, SettingComponentData> = {
|
|||||||
stream: {
|
stream: {
|
||||||
name: 'stream',
|
name: 'stream',
|
||||||
title: 'Stream',
|
title: 'Stream',
|
||||||
description: 'Stream',
|
description: 'Enable real-time data processing for faster predictions.',
|
||||||
controllerType: 'checkbox',
|
controllerType: 'checkbox',
|
||||||
controllerData: {
|
controllerData: {
|
||||||
checked: false,
|
checked: false,
|
||||||
|
|||||||
@ -19,7 +19,7 @@ import DropdownListSidebar, {
|
|||||||
import { useCreateNewThread } from '@/hooks/useCreateNewThread'
|
import { useCreateNewThread } from '@/hooks/useCreateNewThread'
|
||||||
|
|
||||||
import { getConfigurationsData } from '@/utils/componentSettings'
|
import { getConfigurationsData } from '@/utils/componentSettings'
|
||||||
import { toSettingParams } from '@/utils/model_param'
|
import { toRuntimeParams, toSettingParams } from '@/utils/model_param'
|
||||||
|
|
||||||
import EngineSetting from '../EngineSetting'
|
import EngineSetting from '../EngineSetting'
|
||||||
import ModelSetting from '../ModelSetting'
|
import ModelSetting from '../ModelSetting'
|
||||||
@ -44,7 +44,9 @@ const Sidebar: React.FC = () => {
|
|||||||
const threadStates = useAtomValue(threadStatesAtom)
|
const threadStates = useAtomValue(threadStatesAtom)
|
||||||
|
|
||||||
const modelEngineParams = toSettingParams(activeModelParams)
|
const modelEngineParams = toSettingParams(activeModelParams)
|
||||||
const componentDataEngineSetting = getConfigurationsData(modelEngineParams)
|
const modelRuntimeParams = toRuntimeParams(activeModelParams)
|
||||||
|
const componentDataRuntimeSetting = getConfigurationsData(modelEngineParams)
|
||||||
|
const componentDataEngineSetting = getConfigurationsData(modelRuntimeParams)
|
||||||
|
|
||||||
const onReviewInFinderClick = async (type: string) => {
|
const onReviewInFinderClick = async (type: string) => {
|
||||||
if (!activeThread) return
|
if (!activeThread) return
|
||||||
@ -224,6 +226,7 @@ const Sidebar: React.FC = () => {
|
|||||||
<DropdownListSidebar />
|
<DropdownListSidebar />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{componentDataRuntimeSetting.length !== 0 && (
|
||||||
<div className="mt-6">
|
<div className="mt-6">
|
||||||
<CardSidebar title="Inference Parameters" asChild>
|
<CardSidebar title="Inference Parameters" asChild>
|
||||||
<div className="px-2 py-4">
|
<div className="px-2 py-4">
|
||||||
@ -231,15 +234,20 @@ const Sidebar: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</CardSidebar>
|
</CardSidebar>
|
||||||
</div>
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{componentDataEngineSetting.length !== 0 && (
|
||||||
|
<>
|
||||||
<div className="mt-4">
|
<div className="mt-4">
|
||||||
<CardSidebar title="Model Parameters" asChild>
|
<CardSidebar title="Model Parameters" asChild>
|
||||||
<div className="px-2 py-4">
|
<div className="px-2 py-4">
|
||||||
{settingComponentBuilder(componentDataEngineSetting, true)}
|
{settingComponentBuilder(
|
||||||
|
componentDataEngineSetting,
|
||||||
|
true
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardSidebar>
|
</CardSidebar>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="my-4">
|
<div className="my-4">
|
||||||
<CardSidebar
|
<CardSidebar
|
||||||
title="Engine Parameters"
|
title="Engine Parameters"
|
||||||
@ -252,6 +260,8 @@ const Sidebar: React.FC = () => {
|
|||||||
</div>
|
</div>
|
||||||
</CardSidebar>
|
</CardSidebar>
|
||||||
</div>
|
</div>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CardSidebar>
|
</CardSidebar>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user