MCPcopy Create free account
hub / github.com/SmartThingsCommunity/smartthings-cli / buildFromUserInput

Function buildFromUserInput

src/lib/item-input/array.ts:160–168  ·  view source on GitHub ↗
(context: unknown[] = [])

Source from the content-addressed store, hash-verified

158
159 const buildFromUserInput = async (context: unknown[] = []): Promise<T[] | CancelAction> => {
160 const retVal: T[] = []
161
162 if (await editList(retVal, context) === finishAction) {
163 return retVal
164 }
165
166 return cancelAction
167 }
168
169 const summarizeForEdit = options?.summarizeForEdit
170 ?? ((value: T[]) => clipToMaximum(value.map(item => itemDef.summarizeForEdit(item)).join(', '), maxItemValueLength))
171

Callers

nothing calls this directly

Calls 2

editListFunction · 0.85
editValuesFunction · 0.85

Tested by

no test coverage detected