src/vs/workbench/contrib/preferences/browser/settingsTree.ts/SettingArrayRenderer/computeNewList
class SettingArrayRenderer:	private computeNewList(template: ISettingListItemTemplate, e: ISettingListChangeEvent<IListDataItem>): string[] | undefined {
		if (template.context) {
			let newValue: string[] = [];
			if (isArray(template.context.scopeValue)) {
				newValue = [...template.context.scopeValue];
			} else if (isArray(template.context.value)) {
				newValue = [...template.context.value];
			}

			if (e.sourceIndex !== undefined) {
				// A drag and drop occurred
				const sourceIndex = e.sourceIndex;
				const targetIndex = e.targetIndex!;
				const splicedElem = newValue.splice(sourceIndex, 1)[0];
				newValue.splice(targetIndex, 0, splicedElem);
			} else if (e.targetIndex !== undefined) {
				const itemValueData = e.item?.value.data.toString() ?? '';
				// Delete value
				if (!e.item?.value.data && e.originalItem.value.data && e.targetIndex > -1) {
					newValue.splice(e.targetIndex, 1);
				}
				// Update value
				else if (e.item?.value.data && e.originalItem.value.data) {
					if (e.targetIndex > -1) {
						newValue[e.targetIndex] = itemValueData;
					}
					// For some reason, we are updating and cannot find original value
					// Just append the value in this case
					else {
						newValue.push(itemValueData);
					}
				}
				// Add value
				else if (e.item?.value.data && !e.originalItem.value.data && e.targetIndex >= newValue.length) {
					newValue.push(itemValueData);
				}
			}

			if (
				template.context.defaultValue &&
				isArray(template.context.defaultValue) &&
				template.context.defaultValue.length === newValue.length &&
				template.context.defaultValue.join() === newValue.join()
			) {
				return undefined;
			}
			return newValue;
		}

		return undefined;
	}