mirror of
https://github.com/langgenius/dify.git
synced 2026-05-04 17:38:04 +08:00
feat: add runtime upgrade handling and UI components for LLM nodes
This commit is contained in:
@ -22,6 +22,7 @@ import {
|
||||
} from '@/service/workflow'
|
||||
import { AppModeEnum } from '@/types/app'
|
||||
import { storage } from '@/utils/storage'
|
||||
import { setSandboxMigrationDismissed } from '../utils/sandbox-migration-storage'
|
||||
import { useWorkflowTemplate } from './use-workflow-template'
|
||||
|
||||
const hasConnectedUserInput = (nodes: Node[] = [], edges: Edge[] = []): boolean => {
|
||||
@ -46,7 +47,7 @@ export const useWorkflowInit = () => {
|
||||
const [isLoading, setIsLoading] = useState(true)
|
||||
useEffect(() => {
|
||||
workflowStore.setState({ appId: appDetail.id, appName: appDetail.name })
|
||||
}, [appDetail.id, workflowStore])
|
||||
}, [appDetail.id, appDetail.name, workflowStore])
|
||||
|
||||
const handleUpdateWorkflowFileUploadConfig = useCallback((config: FileUploadConfigResponse) => {
|
||||
const { setFileUploadConfig } = workflowStore.getState()
|
||||
@ -92,6 +93,9 @@ export const useWorkflowInit = () => {
|
||||
if (enableSandboxRuntime)
|
||||
storage.remove(runtimeStorageKey)
|
||||
|
||||
if (!enableSandboxRuntime)
|
||||
setSandboxMigrationDismissed(appDetail.id)
|
||||
|
||||
syncWorkflowDraft({
|
||||
url: `/apps/${appDetail.id}/workflows/draft`,
|
||||
params: {
|
||||
|
||||
Reference in New Issue
Block a user