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

Function getBlockConfigurations

apps/sim/tools/params.ts:166–181  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

164let blockConfigCache: Record<string, ToolInputBlockConfig> | null = null
165
166function getBlockConfigurations(): Record<string, ToolInputBlockConfig> {
167 if (!blockConfigCache) {
168 try {
169 const { getAllBlocks } = require('@/blocks')
170 const allBlocks = getAllBlocks()
171 blockConfigCache = {}
172 allBlocks.forEach((block: AppBlockConfig) => {
173 blockConfigCache![block.type] = block
174 })
175 } catch (error) {
176 logger.warn('Could not load block configuration:', error)
177 blockConfigCache = {}
178 }
179 }
180 return blockConfigCache
181}
182
183/**
184 * Gets the correct tool ID for a block operation.

Callers 3

getToolIdForOperationFunction · 0.85
getToolParametersConfigFunction · 0.85
getSubBlocksForToolInputFunction · 0.85

Calls 2

warnMethod · 0.65
getAllBlocksFunction · 0.50

Tested by

no test coverage detected