MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / removeAttachmentAt

Function removeAttachmentAt

src/cli/components/editor-logic.ts:101–104  ·  view source on GitHub ↗
(atts: Attachment[], index: number)

Source from the content-addressed store, hash-verified

99 * the user can delete attachments one by one (newest first) like a token input.
100 */
101export 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}

Callers 2

ChatInputFunction · 0.85

Calls 1

renumberImageLabelsFunction · 0.85

Tested by

no test coverage detected