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
e044e8ef
Commit
e044e8ef
authored
Mar 07, 2024
by
StyleZhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chat mode
parent
af99a555
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
index.tsx
web/app/components/workflow/panel/index.tsx
+5
-5
No files found.
web/app/components/workflow/panel/index.tsx
View file @
e044e8ef
...
...
@@ -7,14 +7,14 @@ import { useNodes } from 'reactflow'
import
type
{
CommonNodeType
}
from
'../types'
import
{
Panel
as
NodePanel
}
from
'../nodes'
import
{
useStore
}
from
'../store'
import
{
useIs
Workflow
}
from
'../hooks'
import
{
useIs
ChatMode
}
from
'../hooks'
import
WorkflowInfo
from
'./workflow-info'
import
DebugAndPreview
from
'./debug-and-preview'
import
RunHistory
from
'./run-history'
import
Record
from
'./record'
const
Panel
:
FC
=
()
=>
{
const
is
Workflow
=
useIsWorkflow
()
const
is
ChatMode
=
useIsChatMode
()
const
runTaskId
=
useStore
(
state
=>
state
.
runTaskId
)
const
nodes
=
useNodes
<
CommonNodeType
>
()
const
selectedNode
=
nodes
.
find
(
node
=>
node
.
data
.
_selected
)
...
...
@@ -25,11 +25,11 @@ const Panel: FC = () => {
showDebugAndPreviewPanel
,
}
=
useMemo
(()
=>
{
return
{
showWorkflowInfoPanel
:
isWorkflow
&&
!
selectedNode
&&
!
runTaskId
,
showWorkflowInfoPanel
:
!
isChatMode
&&
!
selectedNode
&&
!
runTaskId
,
showNodePanel
:
!!
selectedNode
&&
!
runTaskId
,
showDebugAndPreviewPanel
:
!
isWorkflow
&&
!
selectedNode
&&
!
runTaskId
,
showDebugAndPreviewPanel
:
isChatMode
&&
!
selectedNode
&&
!
runTaskId
,
}
},
[
selectedNode
,
is
Workflow
,
runTaskId
])
},
[
selectedNode
,
is
ChatMode
,
runTaskId
])
return
(
<
div
className=
'absolute top-14 right-0 bottom-2 flex z-10'
>
...
...
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