src/vs/workbench/contrib/terminal/browser/links/terminalLinkManager.ts/TerminalLinkManager/getLinks
class TerminalLinkManager:	async getLinks(): Promise<IDetectedLinks> {
		const wordResults: ILink[] = [];
		const webResults: ILink[] = [];
		const fileResults: ILink[] = [];

		for (let i = this._xterm.buffer.active.length - 1; i >= this._xterm.buffer.active.viewportY; i--) {
			const links = await this._getLinksForLine(i);
			if (links) {
				const { wordLinks, webLinks, fileLinks } = links;
				if (wordLinks && wordLinks.length) {
					wordResults.push(...wordLinks.reverse());
				}
				if (webLinks && webLinks.length) {
					webResults.push(...webLinks.reverse());
				}
				if (fileLinks && fileLinks.length) {
					fileResults.push(...fileLinks.reverse());
				}
			}
		}
		return { webLinks: webResults, fileLinks: fileResults, wordLinks: wordResults };
	}