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

Function resolveFieldLabel

apps/sim/lib/workflows/comparison/resolve-values.ts:135–143  ·  view source on GitHub ↗
(blockType: string, subBlockId: string)

Source from the content-addressed store, hash-verified

133 * Falls back to the raw ID if the block or subBlock is not found.
134 */
135export function resolveFieldLabel(blockType: string, subBlockId: string): string {
136 if (subBlockId.startsWith('data.')) {
137 return formatParameterLabel(subBlockId.slice(5))
138 }
139 const blockConfig = getBlock(blockType)
140 if (!blockConfig) return subBlockId
141 const subBlockConfig = blockConfig.subBlocks.find((sb) => sb.id === subBlockId)
142 return subBlockConfig?.title ?? subBlockId
143}
144
145/**
146 * Resolves a dropdown option ID to its human-readable label.

Calls 2

formatParameterLabelFunction · 0.90
getBlockFunction · 0.90

Tested by

no test coverage detected