MCPcopy Index your code
hub / github.com/simstudioai/sim / buildSimpleLevelCondition

Function buildSimpleLevelCondition

apps/sim/lib/logs/filters.ts:240–251  ·  view source on GitHub ↗
(level: string)

Source from the content-addressed store, hash-verified

238 * Does not handle complex running/pending states.
239 */
240export function buildSimpleLevelCondition(level: string): SQL | undefined {
241 if (!level || level === 'all') return undefined
242
243 const levels = level.split(',').filter(Boolean)
244 if (levels.length === 1) {
245 return eq(workflowExecutionLogs.level, levels[0])
246 }
247 if (levels.length > 1) {
248 return inArray(workflowExecutionLogs.level, levels)
249 }
250 return undefined
251}
252
253export interface BuildFilterConditionsOptions {
254 /**

Callers 1

buildFilterConditionsFunction · 0.85

Calls 1

eqFunction · 0.50

Tested by

no test coverage detected