mirror of
https://github.com/langgenius/dify.git
synced 2026-01-06 06:26:00 +00:00
chore: remove node code to panel
This commit is contained in:
@@ -1,31 +1,15 @@
|
||||
import type { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import BaseNode from '../_base/node'
|
||||
import Field from '@/app/components/workflow/nodes/_base/components/field'
|
||||
import AddButton from '@/app/components/base/button/add-button'
|
||||
const i18nPrefix = 'workflow.nodes.llm'
|
||||
|
||||
const Node: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
const handleAddVariable = () => {
|
||||
console.log('add variable')
|
||||
}
|
||||
|
||||
return (
|
||||
<BaseNode>
|
||||
<div>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.model`)}
|
||||
>
|
||||
Model Selector
|
||||
</Field>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.variables`)}
|
||||
operations={
|
||||
<AddButton onClick={handleAddVariable} />
|
||||
}
|
||||
>
|
||||
Var Selector
|
||||
</Field>
|
||||
llm
|
||||
</div>
|
||||
</BaseNode>
|
||||
)
|
||||
|
||||
@@ -1,10 +1,32 @@
|
||||
import type { FC } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import BasePanel from '../_base/panel'
|
||||
import Field from '@/app/components/workflow/nodes/_base/components/field'
|
||||
import AddButton from '@/app/components/base/button/add-button'
|
||||
const i18nPrefix = 'workflow.nodes.llm'
|
||||
|
||||
const Panel: FC = () => {
|
||||
const { t } = useTranslation()
|
||||
const handleAddVariable = () => {
|
||||
console.log('add variable')
|
||||
}
|
||||
return (
|
||||
<BasePanel
|
||||
inputsElement={<div>start panel inputs</div>}
|
||||
inputsElement={<div>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.model`)}
|
||||
>
|
||||
Model Selector
|
||||
</Field>
|
||||
<Field
|
||||
title={t(`${i18nPrefix}.variables`)}
|
||||
operations={
|
||||
<AddButton onClick={handleAddVariable} />
|
||||
}
|
||||
>
|
||||
Var Selector
|
||||
</Field>
|
||||
</div>}
|
||||
outputsElement={<div>start panel outputs</div>}
|
||||
/>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user