fix: conditional render model setting based on selected model (#4300)
This commit is contained in:
parent
a1ea94aeca
commit
c7a5cb52e3
@ -268,34 +268,38 @@ const ThreadRightPanel = () => {
|
|||||||
<div className="flex flex-col gap-4 px-2 py-4">
|
<div className="flex flex-col gap-4 px-2 py-4">
|
||||||
<ModelDropdown />
|
<ModelDropdown />
|
||||||
</div>
|
</div>
|
||||||
<Accordion defaultValue={[]}>
|
{selectedModel && (
|
||||||
{settings.runtimeSettings.length !== 0 && (
|
<Accordion defaultValue={[]}>
|
||||||
<AccordionItem
|
{settings.runtimeSettings.length !== 0 && (
|
||||||
title={INFERENCE_SETTINGS}
|
<AccordionItem
|
||||||
value={INFERENCE_SETTINGS}
|
title={INFERENCE_SETTINGS}
|
||||||
>
|
value={INFERENCE_SETTINGS}
|
||||||
<ModelSetting
|
>
|
||||||
componentProps={settings.runtimeSettings}
|
<ModelSetting
|
||||||
onValueChanged={onValueChanged}
|
componentProps={settings.runtimeSettings}
|
||||||
/>
|
onValueChanged={onValueChanged}
|
||||||
</AccordionItem>
|
/>
|
||||||
)}
|
</AccordionItem>
|
||||||
|
)}
|
||||||
|
|
||||||
{promptTemplateSettings.length !== 0 && (
|
{promptTemplateSettings.length !== 0 && (
|
||||||
<AccordionItem title={MODEL_SETTINGS} value={MODEL_SETTINGS}>
|
<AccordionItem title={MODEL_SETTINGS} value={MODEL_SETTINGS}>
|
||||||
<PromptTemplateSetting componentData={promptTemplateSettings} />
|
<PromptTemplateSetting
|
||||||
</AccordionItem>
|
componentData={promptTemplateSettings}
|
||||||
)}
|
/>
|
||||||
|
</AccordionItem>
|
||||||
|
)}
|
||||||
|
|
||||||
{settings.engineSettings.length !== 0 && (
|
{settings.engineSettings.length !== 0 && (
|
||||||
<AccordionItem title={ENGINE_SETTINGS} value={ENGINE_SETTINGS}>
|
<AccordionItem title={ENGINE_SETTINGS} value={ENGINE_SETTINGS}>
|
||||||
<EngineSetting
|
<EngineSetting
|
||||||
componentData={settings.engineSettings}
|
componentData={settings.engineSettings}
|
||||||
onValueChanged={onValueChanged}
|
onValueChanged={onValueChanged}
|
||||||
/>
|
/>
|
||||||
</AccordionItem>
|
</AccordionItem>
|
||||||
)}
|
)}
|
||||||
</Accordion>
|
</Accordion>
|
||||||
|
)}
|
||||||
</TabsContent>
|
</TabsContent>
|
||||||
<TabsContent value="tools">
|
<TabsContent value="tools">
|
||||||
<Tools />
|
<Tools />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user