mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 09:28:04 +08:00
fix: dsl check plugin
This commit is contained in:
@ -1,13 +1,25 @@
|
||||
import { useCallback } from 'react'
|
||||
import { useStore } from './store'
|
||||
import InstallBundle from '@/app/components/plugins/install-plugin/install-bundle'
|
||||
|
||||
const PluginDependency = () => {
|
||||
const dependencies = useStore(s => s.dependencies)
|
||||
|
||||
const handleCancelInstallBundle = useCallback(() => {
|
||||
const { setDependencies } = useStore.getState()
|
||||
setDependencies([])
|
||||
}, [])
|
||||
|
||||
if (!dependencies.length)
|
||||
return null
|
||||
|
||||
return (
|
||||
<div>a</div>
|
||||
<div>
|
||||
<InstallBundle
|
||||
fromDSLPayload={dependencies}
|
||||
onClose={handleCancelInstallBundle}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@ -77,17 +77,13 @@ const UpdateDSLModal = ({
|
||||
return
|
||||
try {
|
||||
if (appDetail && fileContent) {
|
||||
const leakedData = await mutateAsync({ dslString: fileContent })
|
||||
if (leakedData?.leaked.length) {
|
||||
isCreatingRef.current = false
|
||||
return
|
||||
}
|
||||
setLoading(true)
|
||||
const {
|
||||
graph,
|
||||
features,
|
||||
hash,
|
||||
} = await updateWorkflowDraftFromDSL(appDetail.id, fileContent)
|
||||
await mutateAsync({ dslString: fileContent })
|
||||
const { nodes, edges, viewport } = graph
|
||||
const newFeatures = {
|
||||
file: {
|
||||
|
||||
Reference in New Issue
Block a user