feat: last run no params on click node run not show params

This commit is contained in:
Joel 2025-05-22 16:50:45 +08:00
parent c1bc464e9e
commit 7a9f7a4a71
3 changed files with 11 additions and 4 deletions

View File

@ -79,7 +79,7 @@ const useInspectVarsCrud = () => {
return true
const isSys = isSystemVar([nodeId])
if (isSys)
return sysVars.some(varItem => varItem.selector?.[1] === name)
return sysVars.some(varItem => varItem.selector?.[1]?.replace('sys.', '') === name)
const isChatVar = isConversationVar([nodeId])
if (isChatVar)
return conversationVars.some(varItem => varItem.selector?.[1] === name)

View File

@ -1,6 +1,6 @@
'use client'
import type { FC } from 'react'
import React from 'react'
import React, { useEffect } from 'react'
import { useTranslation } from 'react-i18next'
import {
RiCloseLine,
@ -150,6 +150,15 @@ const BeforeRunForm: FC<BeforeRunFormProps> = ({
onRun(submitData)
}
useEffect(() => {
if(filteredExistVarForms.length === 0)
onRun({})
}, [filteredExistVarForms, onRun])
if(filteredExistVarForms.length === 0)
return null
return (
<div className='absolute inset-0 z-10 rounded-2xl bg-background-overlay-alt'>
<div className='flex h-full flex-col rounded-2xl bg-components-panel-bg'>

View File

@ -34,7 +34,6 @@ import {
useNodeDataUpdate,
useNodesInteractions,
useNodesReadOnly,
useNodesSyncDraft,
useToolIcon,
useWorkflowHistory,
} from '@/app/components/workflow/hooks'
@ -114,7 +113,6 @@ const BasePanel: FC<BasePanelProps> = ({
}, [nodePanelWidth, otherPanelWidth, workflowCanvasWidth, updateNodePanelWidth])
const { handleNodeSelect } = useNodesInteractions()
const { handleSyncWorkflowDraft } = useNodesSyncDraft()
const { nodesReadOnly } = useNodesReadOnly()
const { availableNextBlocks } = useAvailableBlocks(data.type, data.isInIteration, data.isInLoop)
const toolIcon = useToolIcon(data)