From eb7ed2b2aa8e6ba90ce655f6903b563ac7a2101d Mon Sep 17 00:00:00 2001 From: aamunger Date: Wed, 19 Jul 2023 11:41:51 -0700 Subject: [PATCH] label output indexes if more than one --- .../contrib/notebook/browser/notebook.contribution.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts index c74f399bff9..e65e41fcfb8 100644 --- a/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts +++ b/src/vs/workbench/contrib/notebook/browser/notebook.contribution.ts @@ -728,8 +728,10 @@ class NotebookAccessibleViewContribution extends Disposable { } else { text = decoder.decode(pickedBuffer); } - - outputContent = outputContent.concat(`${text}\n`); + const index = viewCell.outputsViewModels.length > 1 + ? `Cell output ${i + 1} of ${viewCell.outputsViewModels.length}\n` + : ''; + outputContent = outputContent.concat(`${index}${text}\n`); } if (!outputContent) {