src/vs/workbench/contrib/terminal/browser/links/terminalProtocolLinkProvider.ts/TerminalProtocolLinkProvider/_provideLinks
class TerminalProtocolLinkProvider:	protected _provideLinks(y: number): TerminalLink[] {
		let startLine = y - 1;
		let endLine = startLine;

		const lines: IBufferLine[] = [
			this._xterm.buffer.active.getLine(startLine)!
		];

		while (startLine >= 0 && this._xterm.buffer.active.getLine(startLine)?.isWrapped) {
			lines.unshift(this._xterm.buffer.active.getLine(startLine - 1)!);
			startLine--;
		}

		while (endLine < this._xterm.buffer.active.length && this._xterm.buffer.active.getLine(endLine + 1)?.isWrapped) {
			lines.push(this._xterm.buffer.active.getLine(endLine + 1)!);
			endLine++;
		}

		this._linkComputerTarget = new TerminalLinkAdapter(this._xterm, startLine, endLine);
		const links = LinkComputer.computeLinks(this._linkComputerTarget);

		return links.map(link => {
			const range = convertLinkRangeToBuffer(lines, this._xterm.cols, link.range, startLine);

			// Check if the link is within the mouse position
			const uri = link.url
				? (typeof link.url === 'string' ? URI.parse(link.url) : link.url)
				: undefined;
			const label = (uri?.scheme === Schemas.file) ? OPEN_FILE_LABEL : undefined;
			return this._instantiationService.createInstance(TerminalLink, this._xterm, range, link.url?.toString() || '', this._xterm.buffer.active.viewportY, this._activateCallback, this._tooltipCallback, true, label);
		});
	}