* Extracts the operation dropdown subblock from a block's configuration. * Returns null if no operation dropdown exists.
(block: BlockConfig)
| 80 | * Returns null if no operation dropdown exists. |
| 81 | */ |
| 82 | function findOperationDropdown(block: BlockConfig): SubBlockConfig | null { |
| 83 | return ( |
| 84 | block.subBlocks.find( |
| 85 | (sb) => sb.id === 'operation' && sb.type === 'dropdown' && Array.isArray(sb.options) |
| 86 | ) ?? null |
| 87 | ) |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Resolves the tool ID for a given operation using the block's tool config. |
no outgoing calls
no test coverage detected