Skip to content

Commit 3af4d05

Browse files
authored
Add setting for kernel completions (#14763)
* Update types to reflect version of Node & browsers * Remove completion exp, add setting to enable it
1 parent 52a880d commit 3af4d05

File tree

11 files changed

+250
-48
lines changed

11 files changed

+250
-48
lines changed

package-lock.json

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,9 +1497,7 @@
14971497
"type": "array",
14981498
"default": [],
14991499
"items": {
1500-
"enum": [
1501-
"KernelCompletions"
1502-
]
1500+
"enum": []
15031501
},
15041502
"markdownDescription": "%jupyter.configuration.jupyter.experiments.optInto.markdownDescription%",
15051503
"scope": "application"
@@ -1508,9 +1506,7 @@
15081506
"type": "array",
15091507
"default": [],
15101508
"items": {
1511-
"enum": [
1512-
"KernelCompletions"
1513-
]
1509+
"enum": []
15141510
},
15151511
"markdownDescription": "%jupyter.configuration.jupyter.experiments.optOutFrom.markdownDescription%",
15161512
"scope": "application"
@@ -1973,6 +1969,13 @@
19731969
"description": "Experimental feature to enable execution analysis in notebooks",
19741970
"scope": "application"
19751971
},
1972+
"jupyter.enableKernelCompletions": {
1973+
"type": "boolean",
1974+
"default": false,
1975+
"description": "Enable Non-Python Kernel Completions",
1976+
"markdownDescription": "%jupyter.configuration.jupyter.enableKernelCompletions.markdownDescription%",
1977+
"scope": "application"
1978+
},
19761979
"jupyter.completionTriggerCharacters": {
19771980
"type": "object",
19781981
"patternProperties": {
@@ -2308,7 +2311,7 @@
23082311
"@types/memoize-one": "^4.1.1",
23092312
"@types/mocha": "^9.1.0",
23102313
"@types/nock": "^10.0.3",
2311-
"@types/node": "^16.18.6",
2314+
"@types/node": "^18.15.0",
23122315
"@types/node-fetch": "^2.5.7",
23132316
"@types/pdfkit": "^0.11.0",
23142317
"@types/promisify-node": "^0.4.0",

package.nls.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,8 @@
236236
"message": "Add PYTHONNOUSERSITE to kernels before starting. This prevents global/user site-packages from being used in the PYTHONPATH of the kernel.",
237237
"comment": ["{Locked='PYTHONNOUSERSITE'}", "{Locked='PYTHONPATH'}"]
238238
},
239-
"jupyter.configuration.jupyter.enableExtendedKernelCompletions.markdownDescription": "Enables Jedi support for extended IntelliSense completions in running Jupyter kernels (see this [setting](https://ipython.readthedocs.io/en/stable/config/options/terminal.html?highlight=use_jedi#configtrait-Completer.use_jedi)). This can greatly impact notebook cell execution performance. Use with caution.",
239+
"jupyter.configuration.jupyter.enableExtendedKernelCompletions.markdownDescription": "Enables Jedi support for extended IntelliSense completions in running Python Jupyter kernels for Python (see this [setting](https://ipython.readthedocs.io/en/stable/config/options/terminal.html?highlight=use_jedi#configtrait-Completer.use_jedi)). This can greatly impact notebook cell execution performance. Use with caution.",
240+
"jupyter.configuration.jupyter.enableKernelCompletions.markdownDescription": "Enables support for auto completion in non-Python Notebooks and Interactive Windows using the associated Jupyter Kernel. \n\nWarning: This can greatly impact cell execution performance. Use with caution.",
240241
"DataScience.exportDialogTitle": {
241242
"message": "Export to Jupyter Notebook",
242243
"comment": ["{Locked='Notebook'}"]

src/gdpr.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,20 @@
403403
"kernelLanguage": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Language of the kernel spec.","owner":"donjayamanne"},
404404
"kernelId": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Hash of the Kernel Connection id.","owner":"donjayamanne"},
405405
"cancelled": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Whether the completion request was cancelled or not.","owner":"donjayamanne"},
406+
"resolved": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Whether we resolved the documentation or not.","owner":"donjayamanne"},
407+
"resolveDuration": {"classification":"SystemMetaData","purpose":"PerformanceAndHealth","comment":"Time taken to resolve the documentation.","owner":"donjayamanne","isMeasurement":true},
408+
"${include}": [
409+
"${F1}"
410+
411+
]
412+
}
413+
*/
414+
//Telemetry.KernelCodeCompletionCannotResolve
415+
/* __GDPR__
416+
"DATASCIENCE.JUPYTER_KERNEL_CODE_COMPLETION_CANNOT_RESOLVE" : {
417+
"kernelConnectionType": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"What kind of kernel spec did we fail to create.","owner":"donjayamanne"},
418+
"kernelLanguage": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Language of the kernel spec.","owner":"donjayamanne"},
419+
"kernelId": {"classification":"PublicNonPersonalData","purpose":"FeatureInsight","comment":"Hash of the Kernel Connection id.","owner":"donjayamanne"},
406420
"${include}": [
407421
"${F1}"
408422

src/platform/common/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ export enum Telemetry {
386386
CellOutputMimeType = 'DS_INTERNAL.CELL_OUTPUT_MIME_TYPE',
387387
JupyterApiUsage = 'DATASCIENCE.JUPYTER_API_USAGE',
388388
KernelCodeCompletion = 'DATASCIENCE.JUPYTER_KERNEL_CODE_COMPLETION',
389+
KernelCodeCompletionCannotResolve = 'DATASCIENCE.JUPYTER_KERNEL_CODE_COMPLETION_CANNOT_RESOLVE',
389390
JupyterKernelApiUsage = 'DATASCIENCE.JUPYTER_KERNEL_API_USAGE',
390391
NewJupyterKernelApiUsage = 'DATASCIENCE.JUPYTER_NEW_KERNEL_API_USAGE',
391392
NewJupyterKernelsApiUsage = 'DATASCIENCE.JUPYTER_NEW_KERNELS_API_USAGE',

src/platform/common/types.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,7 @@ export interface IAsyncDisposableRegistry extends IAsyncDisposable {
296296
}
297297

298298
export enum Experiments {
299-
DataViewerContribution = 'DataViewerContribution',
300-
KernelCompletions = 'KernelCompletions'
299+
DataViewerContribution = 'DataViewerContribution'
301300
}
302301

303302
/**

0 commit comments

Comments
 (0)