src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts/NotebookEditorWidget/find
class NotebookEditorWidget:	async find(query: string, options: INotebookSearchOptions, token: CancellationToken, skipWarmup: boolean = false): Promise<CellFindMatchWithIndex[]> {
		if (!this._notebookViewModel) {
			return [];
		}

		const findMatches = this._notebookViewModel.find(query, options).filter(match => match.length > 0);

		if (!options.includeMarkupPreview && !options.includeOutput) {
			this._webview?.findStop();

			return findMatches.filter(match =>
				(match.cell.cellKind === CellKind.Code && options.includeCodeInput) ||
				(match.cell.cellKind === CellKind.Markup && options.includeMarkupInput)
			);
		}

		const matchMap: { [key: string]: CellFindMatchWithIndex } = {};
		findMatches.forEach(match => {
			if (match.cell.cellKind === CellKind.Code && options.includeCodeInput) {
				matchMap[match.cell.id] = match;
			}

			if (match.cell.cellKind === CellKind.Markup && options.includeMarkupInput) {
				matchMap[match.cell.id] = match;
			}
		});

		if (this._webview) {
			// request all outputs to be rendered
			await this._warmupAll(!!options.includeOutput);
			const webviewMatches = await this._webview.find(query, { caseSensitive: options.caseSensitive, wholeWord: options.wholeWord, includeMarkup: !!options.includeMarkupPreview, includeOutput: !!options.includeOutput });
			// attach webview matches to model find matches
			webviewMatches.forEach(match => {
				if (!options.includeMarkupPreview && match.type === 'preview') {
					// skip outputs if not included
					return;
				}

				if (!options.includeOutput && match.type === 'output') {
					// skip outputs if not included
					return;
				}

				const exisitingMatch = matchMap[match.cellId];

				if (exisitingMatch) {
					exisitingMatch.webviewMatches.push(match);
				} else {

					matchMap[match.cellId] = new CellFindMatchModel(
						this._notebookViewModel!.viewCells.find(cell => cell.id === match.cellId)!,
						this._notebookViewModel!.viewCells.findIndex(cell => cell.id === match.cellId)!,
						[],
						[match]
					);
				}
			});
		}

		const ret: CellFindMatchWithIndex[] = [];
		this._notebookViewModel.viewCells.forEach((cell, index) => {
			if (matchMap[cell.id]) {
				ret.push(new CellFindMatchModel(cell, index, matchMap[cell.id].contentMatches, matchMap[cell.id].webviewMatches));
			}
		});

		return ret;
	}