mirror of https://github.com/langgenius/dify.git
fix: only workflow should display start modal (#24623)
This commit is contained in:
parent
3dae108f84
commit
17908fbf6b
|
|
@ -57,17 +57,21 @@ export const useWorkflowInit = () => {
|
|||
if (error && error.json && !error.bodyUsed && appDetail) {
|
||||
error.json().then((err: any) => {
|
||||
if (err.code === 'draft_workflow_not_exist') {
|
||||
const isAdvancedChat = appDetail.mode === 'advanced-chat'
|
||||
workflowStore.setState({
|
||||
notInitialWorkflow: true,
|
||||
showOnboarding: true,
|
||||
showOnboarding: !isAdvancedChat,
|
||||
hasShownOnboarding: false,
|
||||
})
|
||||
const nodesData = isAdvancedChat ? nodesTemplate : []
|
||||
const edgesData = isAdvancedChat ? edgesTemplate : []
|
||||
|
||||
syncWorkflowDraft({
|
||||
url: `/apps/${appDetail.id}/workflows/draft`,
|
||||
params: {
|
||||
graph: {
|
||||
nodes: [],
|
||||
edges: [],
|
||||
nodes: nodesData,
|
||||
edges: edgesData,
|
||||
},
|
||||
features: {
|
||||
retriever_resource: { enabled: true },
|
||||
|
|
|
|||
Loading…
Reference in New Issue