(atts: Attachment[], index: number)
| 99 | * the user can delete attachments one by one (newest first) like a token input. |
| 100 | */ |
| 101 | export function removeAttachmentAt(atts: Attachment[], index: number): Attachment[] { |
| 102 | if (index < 0 || index >= atts.length) return atts; |
| 103 | return renumberImageLabels(atts.filter((_, i) => i !== index)); |
| 104 | } |
no test coverage detected