@zerowidth/workbench-sdk 2.7.0 → 2.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/utilities/typers.js +7 -2
package/package.json
CHANGED
package/src/utilities/typers.js
CHANGED
|
@@ -229,12 +229,17 @@ export function convertImportToNodeType(importDef) {
|
|
|
229
229
|
requestedSnapshot: processedImportDef.requestedSnapshot,
|
|
230
230
|
inputs: inputNodes.map(node => {
|
|
231
231
|
if (node.type === 'input-data') {
|
|
232
|
+
// An input with a default doesn't need a connection: left
|
|
233
|
+
// unconnected (or left out by a tool call), it gets the default,
|
|
234
|
+
// the same as running the imported flow on its own.
|
|
235
|
+
const defaultValue = node.settings?.default_value;
|
|
232
236
|
return {
|
|
233
237
|
// Use the node's settings.key as the input name to match port connections
|
|
234
238
|
name: node.settings?.key || 'data',
|
|
235
|
-
display_name:
|
|
239
|
+
display_name: node.settings?.display_name || node.settings?.key || 'Data',
|
|
236
240
|
type: node.settings?.type || 'any',
|
|
237
|
-
required:
|
|
241
|
+
required: defaultValue === undefined,
|
|
242
|
+
...(defaultValue !== undefined ? { default: defaultValue } : {}),
|
|
238
243
|
is_data_input: true,
|
|
239
244
|
description: node.settings?.description || 'Imported data input'
|
|
240
245
|
};
|