Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
eab405af
Commit
eab405af
authored
Mar 05, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: node add memo
parent
93999cec
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
26 additions
and
13 deletions
+26
-13
node.tsx
web/app/components/workflow/nodes/code/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/direct-answer/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/end/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/http/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/if-else/node.tsx
+2
-1
node.tsx
...pp/components/workflow/nodes/knowledge-retrieval/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/llm/node.tsx
+2
-1
panel.tsx
web/app/components/workflow/nodes/llm/panel.tsx
+2
-1
node.tsx
...pp/components/workflow/nodes/question-classifier/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/start/node.tsx
+2
-1
node.tsx
...app/components/workflow/nodes/template-transform/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/tool/node.tsx
+2
-1
node.tsx
web/app/components/workflow/nodes/variable-assigner/node.tsx
+2
-1
No files found.
web/app/components/workflow/nodes/code/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
CodeNodeType
}
from
'./types'
import
type
{
CodeNodeType
}
from
'./types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
...
@@ -9,4 +10,4 @@ const Node: FC<NodeProps<CodeNodeType>> = () => {
...
@@ -9,4 +10,4 @@ const Node: FC<NodeProps<CodeNodeType>> = () => {
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/direct-answer/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
InfoPanel
from
'../_base/components/info-panel'
import
InfoPanel
from
'../_base/components/info-panel'
import
type
{
DirectAnswerNodeType
}
from
'./types'
import
type
{
DirectAnswerNodeType
}
from
'./types'
...
@@ -16,4 +17,4 @@ const Node: FC<NodeProps<DirectAnswerNodeType>> = ({
...
@@ -16,4 +17,4 @@ const Node: FC<NodeProps<DirectAnswerNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/end/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
type
{
EndNodeType
}
from
'./types'
import
type
{
EndNodeType
}
from
'./types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
...
@@ -24,4 +25,4 @@ const Node: FC<NodeProps<EndNodeType>> = ({
...
@@ -24,4 +25,4 @@ const Node: FC<NodeProps<EndNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/http/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
HttpNodeType
}
from
'./types'
import
type
{
HttpNodeType
}
from
'./types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
...
@@ -16,4 +17,4 @@ const Node: FC<NodeProps<HttpNodeType>> = ({
...
@@ -16,4 +17,4 @@ const Node: FC<NodeProps<HttpNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/if-else/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
type
{
NodeProps
}
from
'reactflow'
import
type
{
NodeProps
}
from
'reactflow'
import
{
NodeSourceHandle
}
from
'../_base/components/node-handle'
import
{
NodeSourceHandle
}
from
'../_base/components/node-handle'
...
@@ -50,4 +51,4 @@ const IfElseNode: FC<NodeProps<IfElseNodeType>> = (props) => {
...
@@ -50,4 +51,4 @@ const IfElseNode: FC<NodeProps<IfElseNodeType>> = (props) => {
)
)
}
}
export
default
IfElseNode
export
default
React
.
memo
(
IfElseNode
)
web/app/components/workflow/nodes/knowledge-retrieval/node.tsx
View file @
eab405af
import
{
type
FC
,
useEffect
,
useState
}
from
'react'
import
{
type
FC
,
useEffect
,
useState
}
from
'react'
import
React
from
'react'
import
type
{
KnowledgeRetrievalNodeType
}
from
'./types'
import
type
{
KnowledgeRetrievalNodeType
}
from
'./types'
import
{
Folder
}
from
'@/app/components/base/icons/src/vender/solid/files'
import
{
Folder
}
from
'@/app/components/base/icons/src/vender/solid/files'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
...
@@ -38,4 +39,4 @@ const Node: FC<NodeProps<KnowledgeRetrievalNodeType>> = ({
...
@@ -38,4 +39,4 @@ const Node: FC<NodeProps<KnowledgeRetrievalNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/llm/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
LLMNodeType
}
from
'./types'
import
type
{
LLMNodeType
}
from
'./types'
import
{
import
{
useTextGenerationCurrentProviderAndModelAndModelList
,
useTextGenerationCurrentProviderAndModelAndModelList
,
...
@@ -24,4 +25,4 @@ const Node: FC<NodeProps<LLMNodeType>> = ({
...
@@ -24,4 +25,4 @@ const Node: FC<NodeProps<LLMNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/llm/panel.tsx
View file @
eab405af
...
@@ -13,6 +13,7 @@ import Split from '@/app/components/workflow/nodes/_base/components/split'
...
@@ -13,6 +13,7 @@ import Split from '@/app/components/workflow/nodes/_base/components/split'
import
ModelParameterModal
from
'@/app/components/header/account-setting/model-provider-page/model-parameter-modal'
import
ModelParameterModal
from
'@/app/components/header/account-setting/model-provider-page/model-parameter-modal'
import
OutputVars
,
{
VarItem
}
from
'@/app/components/workflow/nodes/_base/components/output-vars'
import
OutputVars
,
{
VarItem
}
from
'@/app/components/workflow/nodes/_base/components/output-vars'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
{
Resolution
}
from
'@/types/app'
const
i18nPrefix
=
'workflow.nodes.llm'
const
i18nPrefix
=
'workflow.nodes.llm'
...
@@ -119,7 +120,7 @@ const Panel: FC<NodeProps<LLMNodeType>> = ({
...
@@ -119,7 +120,7 @@ const Panel: FC<NodeProps<LLMNodeType>> = ({
tooltip=
{
t
(
'appDebug.vision.description'
)
!
}
tooltip=
{
t
(
'appDebug.vision.description'
)
!
}
operations=
{
operations=
{
<
ResolutionPicker
<
ResolutionPicker
value=
{
inputs
.
vision
.
configs
.
detail
}
value=
{
inputs
.
vision
.
configs
?.
detail
||
Resolution
.
high
}
onChange=
{
handleVisionResolutionChange
}
onChange=
{
handleVisionResolutionChange
}
/>
/>
}
}
...
...
web/app/components/workflow/nodes/question-classifier/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
NodeProps
}
from
'reactflow'
import
type
{
NodeProps
}
from
'reactflow'
import
InfoPanel
from
'../_base/components/info-panel'
import
InfoPanel
from
'../_base/components/info-panel'
import
{
NodeSourceHandle
}
from
'../_base/components/node-handle'
import
{
NodeSourceHandle
}
from
'../_base/components/node-handle'
...
@@ -46,4 +47,4 @@ const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => {
...
@@ -46,4 +47,4 @@ const Node: FC<NodeProps<QuestionClassifierNodeType>> = (props) => {
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/start/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
InputVarTypeIcon
from
'../_base/components/input-var-type-icon'
import
InputVarTypeIcon
from
'../_base/components/input-var-type-icon'
import
type
{
StartNodeType
}
from
'./types'
import
type
{
StartNodeType
}
from
'./types'
...
@@ -33,4 +34,4 @@ const Node: FC<NodeProps<StartNodeType>> = ({
...
@@ -33,4 +34,4 @@ const Node: FC<NodeProps<StartNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/template-transform/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
TemplateTransformNodeType
}
from
'./types'
import
type
{
TemplateTransformNodeType
}
from
'./types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
import
type
{
NodeProps
}
from
'@/app/components/workflow/types'
...
@@ -9,4 +10,4 @@ const Node: FC<NodeProps<TemplateTransformNodeType>> = () => {
...
@@ -9,4 +10,4 @@ const Node: FC<NodeProps<TemplateTransformNodeType>> = () => {
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/tool/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
ToolNodeType
}
from
'./types'
import
type
{
ToolNodeType
}
from
'./types'
import
{
VarType
}
from
'./types'
import
{
VarType
}
from
'./types'
import
{
Variable02
}
from
'@/app/components/base/icons/src/vender/solid/development'
import
{
Variable02
}
from
'@/app/components/base/icons/src/vender/solid/development'
...
@@ -36,4 +37,4 @@ const Node: FC<NodeProps<ToolNodeType>> = ({
...
@@ -36,4 +37,4 @@ const Node: FC<NodeProps<ToolNodeType>> = ({
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
web/app/components/workflow/nodes/variable-assigner/node.tsx
View file @
eab405af
import
type
{
FC
}
from
'react'
import
type
{
FC
}
from
'react'
import
React
from
'react'
import
type
{
NodeProps
}
from
'reactflow'
import
type
{
NodeProps
}
from
'reactflow'
import
{
useTranslation
}
from
'react-i18next'
import
{
useTranslation
}
from
'react-i18next'
import
{
NodeTargetHandle
}
from
'../_base/components/node-handle'
import
{
NodeTargetHandle
}
from
'../_base/components/node-handle'
...
@@ -78,4 +79,4 @@ const Node: FC<NodeProps<VariableAssignerNodeType>> = (props) => {
...
@@ -78,4 +79,4 @@ const Node: FC<NodeProps<VariableAssignerNodeType>> = (props) => {
)
)
}
}
export
default
Node
export
default
React
.
memo
(
Node
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment