mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 00:59:03 +01:00
notebooks: add initial kernel/renderer constraints
See https://github.com/microsoft/vscode/issues/119899 Backwards compatible, initially. The implementation should be pretty unsurprising. Some churn from data wiring. This does the bulk of the work. The only remaining item is caching the last renderer used for notebooks in the workspace to avoid running selection again if the user reopens/reloads the window.
This commit is contained in:
@@ -124,7 +124,20 @@ export class ExtHostNotebookKernelProviderAdapter extends Disposable {
|
||||
description: kernel.description,
|
||||
detail: kernel.detail,
|
||||
isPreferred: kernel.isPreferred,
|
||||
preloads: kernel.preloads,
|
||||
preloads: kernel.preloads?.map(preload => {
|
||||
// todo@connor4312: back compat on 2020-04-12, remove after transition
|
||||
if (URI.isUri(preload)) {
|
||||
preload = { uri: preload, provides: [] };
|
||||
}
|
||||
|
||||
return {
|
||||
uri: preload.uri, provides: typeof preload.provides === 'string'
|
||||
? [preload.provides]
|
||||
: preload.provides === undefined
|
||||
? []
|
||||
: preload.provides
|
||||
};
|
||||
}),
|
||||
supportedLanguages: kernel.supportedLanguages,
|
||||
implementsInterrupt: !!kernel.interrupt
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user