MCPcopy Create free account
hub / github.com/simstudioai/sim / supportsExecution

Function supportsExecution

apps/sim/lib/workflows/triggers/triggers.ts:148–171  ·  view source on GitHub ↗
(path: StartBlockPath, execution: StartExecutionKind)

Source from the content-addressed store, hash-verified

146}
147
148function supportsExecution(path: StartBlockPath, execution: StartExecutionKind): boolean {
149 if (execution === 'external') {
150 return path === StartBlockPath.EXTERNAL_TRIGGER
151 }
152
153 if (path === StartBlockPath.UNIFIED || path === StartBlockPath.LEGACY_STARTER) {
154 return true
155 }
156
157 if (execution === 'chat') {
158 return path === StartBlockPath.SPLIT_CHAT
159 }
160
161 if (execution === 'api') {
162 return path === StartBlockPath.SPLIT_API || path === StartBlockPath.SPLIT_INPUT
163 }
164
165 return (
166 path === StartBlockPath.SPLIT_API ||
167 path === StartBlockPath.SPLIT_INPUT ||
168 path === StartBlockPath.SPLIT_MANUAL ||
169 path === StartBlockPath.EXTERNAL_TRIGGER
170 )
171}
172
173export function resolveStartCandidates<T extends MinimalBlock>(
174 blocks: Record<string, T> | T[],

Callers 1

resolveStartCandidatesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected