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

Function renumberImageLabels

src/cli/components/editor-logic.ts:91–94  ·  view source on GitHub ↗
(atts: Attachment[])

Source from the content-addressed store, hash-verified

89 * Other chip kinds keep their own labels (a byte/line count or a file/dir name). Pure.
90 */
91export function renumberImageLabels(atts: Attachment[]): Attachment[] {
92 let n = 0;
93 return atts.map(a => (a.kind === 'image' ? { ...a, label: `Image #${++n}` } : a));
94}
95
96/**
97 * Remove the chip at `index` and renumber the remaining images. Out-of-range index

Callers 2

removeAttachmentAtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected