mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 01:18:05 +08:00
chore: new block enum
This commit is contained in:
@ -29,78 +29,75 @@ const Panel: FC = () => {
|
||||
// const isChatMode = modelMode === 'chat'
|
||||
|
||||
return (
|
||||
<BasePanel
|
||||
inputsElement={
|
||||
<div className='mt-2 px-4 space-y-4'>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.model`)}
|
||||
>
|
||||
<ModelParameterModal
|
||||
popupClassName='!w-[387px]'
|
||||
isAdvancedMode={true}
|
||||
mode={model?.mode}
|
||||
provider={model?.provider}
|
||||
completionParams={model.completion_params}
|
||||
modelId={model.name}
|
||||
setModel={handleModelChanged}
|
||||
onCompletionParamsChange={handleCompletionParamsChange}
|
||||
hideDebugWithMultipleModel
|
||||
debugWithMultipleModel={false}
|
||||
/>
|
||||
</Field>
|
||||
<BasePanel>
|
||||
<div className='mt-2 px-4 space-y-4'>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.model`)}
|
||||
>
|
||||
<ModelParameterModal
|
||||
popupClassName='!w-[387px]'
|
||||
isAdvancedMode={true}
|
||||
mode={model?.mode}
|
||||
provider={model?.provider}
|
||||
completionParams={model.completion_params}
|
||||
modelId={model.name}
|
||||
setModel={handleModelChanged}
|
||||
onCompletionParamsChange={handleCompletionParamsChange}
|
||||
hideDebugWithMultipleModel
|
||||
debugWithMultipleModel={false}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.variables`)}
|
||||
operations={
|
||||
<AddButton onClick={handleAddVariable} />
|
||||
}
|
||||
>
|
||||
<VarList
|
||||
readonly={readOnly}
|
||||
list={inputs.variables}
|
||||
onChange={handleVarListChange}
|
||||
/>
|
||||
</Field>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.variables`)}
|
||||
operations={
|
||||
<AddButton onClick={handleAddVariable} />
|
||||
}
|
||||
>
|
||||
<VarList
|
||||
readonly={readOnly}
|
||||
list={inputs.variables}
|
||||
onChange={handleVarListChange}
|
||||
/>
|
||||
</Field>
|
||||
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.context`)}
|
||||
operations={
|
||||
<Switch
|
||||
defaultValue={inputs.context.enabled}
|
||||
onChange={toggleContextEnabled}
|
||||
size='md'
|
||||
/>
|
||||
}
|
||||
>
|
||||
{inputs.context.enabled
|
||||
? (
|
||||
<div>Context</div>
|
||||
)
|
||||
: null}
|
||||
</Field>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.prompt`)}
|
||||
>
|
||||
Prompt
|
||||
</Field>
|
||||
<Split />
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.vision`)}
|
||||
inline
|
||||
>
|
||||
Vision
|
||||
</Field>
|
||||
{/* This version not support function */}
|
||||
{/* <Field
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.context`)}
|
||||
operations={
|
||||
<Switch
|
||||
defaultValue={inputs.context.enabled}
|
||||
onChange={toggleContextEnabled}
|
||||
size='md'
|
||||
/>
|
||||
}
|
||||
>
|
||||
{inputs.context.enabled
|
||||
? (
|
||||
<div>Context</div>
|
||||
)
|
||||
: null}
|
||||
</Field>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.prompt`)}
|
||||
>
|
||||
Prompt
|
||||
</Field>
|
||||
<Split />
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.vision`)}
|
||||
inline
|
||||
>
|
||||
Vision
|
||||
</Field>
|
||||
{/* This version not support function */}
|
||||
{/* <Field
|
||||
title={t(`${i18nPrefix}.fu`)}
|
||||
inline
|
||||
>
|
||||
Functions
|
||||
</Field> */}
|
||||
</div>
|
||||
}
|
||||
outputsElement={<div>start panel outputs</div>}
|
||||
/>
|
||||
</div>
|
||||
</BasePanel>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user