mirror of
https://github.com/simstudioai/sim.git
synced 2026-04-06 03:00:16 -04:00
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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user