From ccce135bf55561813b739af2b3cb9cc08f43cdc0 Mon Sep 17 00:00:00 2001 From: zhsama Date: Wed, 22 Oct 2025 12:38:03 +0800 Subject: [PATCH] fix(workflow): add setShowVariableInspectPanel for specific block types in useLastRun hook --- .../_base/components/workflow-panel/last-run/use-last-run.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts index 6d81949cda..7ffbea1b1a 100644 --- a/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts +++ b/web/app/components/workflow/nodes/_base/components/workflow-panel/last-run/use-last-run.ts @@ -205,7 +205,7 @@ const useLastRun = ({ }) } const workflowStore = useWorkflowStore() - const { setInitShowLastRunTab } = workflowStore.getState() + const { setInitShowLastRunTab, setShowVariableInspectPanel } = workflowStore.getState() const initShowLastRunTab = useStore(s => s.initShowLastRunTab) const [tabType, setTabType] = useState(initShowLastRunTab ? TabType.lastRun : TabType.settings) useEffect(() => { @@ -318,6 +318,8 @@ const useLastRun = ({ const { isValid } = checkValid() if (!isValid) return + if (blockType === BlockEnum.TriggerWebhook || blockType === BlockEnum.TriggerPlugin) + setShowVariableInspectPanel(true) if (isCustomRunNode) { showSingleRun() return