From 00327d7bb5cd31e00608b504709f5f14b7d8c99a Mon Sep 17 00:00:00 2001 From: goingforstudying-ctrl Date: Wed, 24 Jun 2026 06:52:11 -0400 Subject: [PATCH] fix: add missing reasoningAppId to E2EEnv type and export useWorkflowReasoning hook - Add reasoningAppId field to E2EEnv and E2ECapabilities types in cli/test/e2e/setup/env.ts - Add reasoningAppId to loadE2EEnv and resolveEnv functions - Export use-workflow-reasoning from use-workflow-run-event/index.ts so the hook is reachable from production code, resolving the knip dead-code check failure. --- cli/test/e2e/setup/env.ts | 5 +++++ .../workflow/hooks/use-workflow-run-event/index.ts | 1 + 2 files changed, 6 insertions(+) diff --git a/cli/test/e2e/setup/env.ts b/cli/test/e2e/setup/env.ts index 3f71b514426..8268a1cfe17 100644 --- a/cli/test/e2e/setup/env.ts +++ b/cli/test/e2e/setup/env.ts @@ -74,6 +74,8 @@ export type E2EEnv = { fileAppId: string /** Chat app (advanced-chat) with a file input variable */ fileChatAppId: string + /** Chat app with separated reasoning (needs real model) */ + reasoningAppId: string /** * Secondary workspace ID — EE only ("auto_test1"). * Empty in CE mode (CE has a single workspace). @@ -122,6 +124,7 @@ export type E2ECapabilities = { hitlExternalAppId: string hitlSingleActionAppId: string hitlMultiNodeAppId: string + reasoningAppId: string ws2AppId: string } @@ -171,6 +174,7 @@ export function loadE2EEnv(): E2EEnv { hitlMultiNodeAppId: process.env.DIFY_E2E_HITL_MULTI_NODE_APP_ID ?? '', fileAppId: process.env.DIFY_E2E_FILE_APP_ID ?? '', fileChatAppId: process.env.DIFY_E2E_FILE_CHAT_APP_ID ?? '', + reasoningAppId: process.env.DIFY_E2E_REASONING_APP_ID ?? '', ws2Id: process.env.DIFY_E2E_WS2_ID ?? '', ws2AppId: process.env.DIFY_E2E_WS2_APP_ID ?? '', email: process.env.DIFY_E2E_EMAIL!, @@ -210,6 +214,7 @@ export function resolveEnv(caps: E2ECapabilities | undefined): E2EEnv { hitlExternalAppId: caps.hitlExternalAppId || env.hitlExternalAppId, hitlSingleActionAppId: caps.hitlSingleActionAppId || env.hitlSingleActionAppId, hitlMultiNodeAppId: caps.hitlMultiNodeAppId || env.hitlMultiNodeAppId, + reasoningAppId: caps.reasoningAppId || env.reasoningAppId, ws2AppId: caps.ws2AppId || env.ws2AppId, } } diff --git a/web/app/components/workflow/hooks/use-workflow-run-event/index.ts b/web/app/components/workflow/hooks/use-workflow-run-event/index.ts index 43486873339..1c64712dfd5 100644 --- a/web/app/components/workflow/hooks/use-workflow-run-event/index.ts +++ b/web/app/components/workflow/hooks/use-workflow-run-event/index.ts @@ -14,6 +14,7 @@ export * from './use-workflow-node-loop-started' export * from './use-workflow-node-retry' export * from './use-workflow-node-started' export * from './use-workflow-paused' +export * from './use-workflow-reasoning' export * from './use-workflow-started' export * from './use-workflow-text-chunk' export * from './use-workflow-text-replace'