src/vs/workbench/contrib/terminal/browser/terminalTabsList.ts/TerminalTabsDragAndDrop/drop
class TerminalTabsDragAndDrop:	drop(data: IDragAndDropData, targetInstance: ITerminalInstance | undefined, targetIndex: number | undefined, originalEvent: DragEvent): void {
		this._autoFocusDisposable.dispose();
		this._autoFocusInstance = undefined;

		let sourceInstances: ITerminalInstance[] | undefined;
		const terminalResources = originalEvent.dataTransfer?.getData(DataTransfers.TERMINALS);
		if (terminalResources) {
			const uri = URI.parse(JSON.parse(terminalResources)[0]);
			if (uri.scheme === Schemas.vscodeTerminal) {
				const instance = this._terminalService.instances.find(e => e.resource.path === uri.path);
				if (instance) {
					sourceInstances = [instance];
				}
				this._terminalService.moveToTerminalView(instance);
			}
		}

		if (sourceInstances === undefined) {
			if (!(data instanceof ElementsDragAndDropData)) {
				this._handleExternalDrop(targetInstance, originalEvent);
				return;
			}

			const draggedElement = data.getData();
			if (!draggedElement || !Array.isArray(draggedElement)) {
				return;
			}

			sourceInstances = [];
			for (const e of draggedElement) {
				if ('instanceId' in e) {
					sourceInstances.push(e as ITerminalInstance);
				}
			}
		}

		if (!targetInstance) {
			this._terminalGroupService.moveGroupToEnd(sourceInstances[0]);
			return;
		}

		let focused = false;
		for (const instance of sourceInstances) {
			this._terminalGroupService.moveGroup(instance, targetInstance);
			if (!focused) {
				this._terminalService.setActiveInstance(instance);
				focused = true;
			}
		}
	}