|
1 | 1 | import { inject, injectable } from 'inversify'; |
2 | 2 | import { IDisposable } from 'monaco-editor'; |
3 | 3 | import * as uuid from 'uuid/v4'; |
4 | | -import { Event, EventEmitter, Position, Uri, ViewColumn } from 'vscode'; |
| 4 | +import { env, Event, EventEmitter, Position, UIKind, Uri, ViewColumn } from 'vscode'; |
5 | 5 | import { createMarkdownCell } from '../../../datascience-ui/common/cellFactory'; |
6 | 6 | import { IApplicationShell, IDocumentManager } from '../../common/application/types'; |
7 | 7 | import { PYTHON_LANGUAGE } from '../../common/constants'; |
@@ -224,13 +224,20 @@ export class GatherListener implements IInteractiveWindowListener { |
224 | 224 | const file = |
225 | 225 | cell.file === Identifiers.EmptyFileName && this.notebookUri ? this.notebookUri.fsPath : cell.file; |
226 | 226 |
|
| 227 | + const data = |
| 228 | + env.uiKind === UIKind?.Web |
| 229 | + ? createMarkdownCell( |
| 230 | + localize.DataScience.gatheredNotebookDescriptionInMarkdownWithoutSurvey().format(file) |
| 231 | + ) |
| 232 | + : createMarkdownCell(localize.DataScience.gatheredNotebookDescriptionInMarkdown().format(file)); |
| 233 | + |
227 | 234 | let cells: ICell[] = [ |
228 | 235 | { |
229 | 236 | id: uuid(), |
230 | 237 | file: '', |
231 | 238 | line: 0, |
232 | 239 | state: 0, |
233 | | - data: createMarkdownCell(localize.DataScience.gatheredNotebookDescriptionInMarkdown().format(file)) |
| 240 | + data |
234 | 241 | } |
235 | 242 | ]; |
236 | 243 |
|
@@ -290,7 +297,10 @@ export class GatherListener implements IInteractiveWindowListener { |
290 | 297 | slicedProgram = slicedProgram.replace(re, ''); |
291 | 298 | } |
292 | 299 |
|
293 | | - const annotatedScript = `${localize.DataScience.gatheredScriptDescription()}${defaultCellMarker}\n${slicedProgram}`; |
| 300 | + const annotatedScript = |
| 301 | + env?.uiKind === UIKind?.Web |
| 302 | + ? `${localize.DataScience.gatheredScriptDescriptionWithoutSurvey()}${defaultCellMarker}\n${slicedProgram}` |
| 303 | + : `${localize.DataScience.gatheredScriptDescription()}${defaultCellMarker}\n${slicedProgram}`; |
294 | 304 |
|
295 | 305 | // Don't want to open the gathered code on top of the interactive window |
296 | 306 | let viewColumn: ViewColumn | undefined; |
|
0 commit comments