fix(chat): use explicit trigger type check instead of heuristic for chat guard (#3419)

* fix(chat): use explicit trigger type check instead of heuristic for chat guard

* fix(chat): remove heuristic fallback from isExecutingFromChat

Use only overrideTriggerType === 'chat' instead of also checking
for 'input' in workflowInput, which can false-positive on manual
executions with workflow input.

* fix(chat): use isExecutingFromChat variable consistently in callbacks

Replace inline overrideTriggerType !== 'chat' checks with
!isExecutingFromChat to stay consistent with the rest of the function.
This commit is contained in:
Waleed
2026-03-04 19:05:45 -08:00
committed by GitHub
parent 115b4581a5
commit 8579beb199

View File

@@ -1124,9 +1124,7 @@ export function useWorkflowExecution() {
{} as typeof workflowBlocks
)
const isExecutingFromChat =
overrideTriggerType === 'chat' ||
(workflowInput && typeof workflowInput === 'object' && 'input' in workflowInput)
const isExecutingFromChat = overrideTriggerType === 'chat'
logger.info('Executing workflow', {
isDiffMode: currentWorkflow.isDiffMode,