getQueuedCommandAttachments function
Get queued command attachments from a list of queued commands.
Implementation
List<Attachment> getQueuedCommandAttachments(
List<Map<String, dynamic>> queuedCommands,
) {
return queuedCommands
.map(
(cmd) => QueuedCommandAttachment(
prompt: cmd['prompt'],
sourceUuid: cmd['source_uuid'] as String?,
imagePasteIds: (cmd['imagePasteIds'] as List?)?.cast<int>(),
commandMode: cmd['commandMode'] as String?,
),
)
.toList();
}