Skip to content

Commit 8579beb

Browse files
authored
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.
1 parent 115b458 commit 8579beb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/hooks/use-workflow-execution.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1124,9 +1124,7 @@ export function useWorkflowExecution() {
11241124
{} as typeof workflowBlocks
11251125
)
11261126

1127-
const isExecutingFromChat =
1128-
overrideTriggerType === 'chat' ||
1129-
(workflowInput && typeof workflowInput === 'object' && 'input' in workflowInput)
1127+
const isExecutingFromChat = overrideTriggerType === 'chat'
11301128

11311129
logger.info('Executing workflow', {
11321130
isDiffMode: currentWorkflow.isDiffMode,

0 commit comments

Comments
 (0)