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
149eb38e
Commit
149eb38e
authored
Mar 13, 2024
by
Joel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: tool single run
parent
d777184f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
panel.tsx
web/app/components/workflow/nodes/tool/panel.tsx
+5
-0
use-config.ts
web/app/components/workflow/nodes/tool/use-config.ts
+2
-0
No files found.
web/app/components/workflow/nodes/tool/panel.tsx
View file @
149eb38e
...
...
@@ -13,6 +13,7 @@ import ConfigCredential from '@/app/components/tools/setting/build-in/config-cre
import
Loading
from
'@/app/components/base/loading'
import
BeforeRunForm
from
'@/app/components/workflow/nodes/_base/components/before-run-form'
import
OutputVars
,
{
VarItem
}
from
'@/app/components/workflow/nodes/_base/components/output-vars'
import
ResultPanel
from
'@/app/components/workflow/run/result-panel'
const
i18nPrefix
=
'workflow.nodes.tool'
...
...
@@ -43,8 +44,11 @@ const Panel: FC<NodePanelProps<ToolNodeType>> = ({
runningStatus
,
handleRun
,
handleStop
,
runResult
,
}
=
useConfig
(
id
,
data
)
// console.log(inputs)
if
(
isLoading
)
{
return
<
div
className=
'flex h-[200px] items-center justify-center'
>
<
Loading
/>
...
...
@@ -158,6 +162,7 @@ const Panel: FC<NodePanelProps<ToolNodeType>> = ({
runningStatus=
{
runningStatus
}
onRun=
{
handleRun
}
onStop=
{
handleStop
}
result=
{
<
ResultPanel
{
...
runResult
}
showSteps=
{
false
}
/>
}
/>
)
}
</
div
>
...
...
web/app/components/workflow/nodes/tool/use-config.ts
View file @
149eb38e
...
...
@@ -114,6 +114,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
setRunInputData
,
handleRun
,
handleStop
,
runResult
,
}
=
useOneStepRun
<
ToolNodeType
>
({
id
,
data
:
inputs
,
...
...
@@ -171,6 +172,7 @@ const useConfig = (id: string, payload: ToolNodeType) => {
runningStatus
,
handleRun
,
handleStop
,
runResult
,
}
}
...
...
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