Allow empty extension location for internal notebook contributions

No need to specify a fake location
This commit is contained in:
Matt Bierner
2021-08-18 14:38:40 -07:00
parent 54528758ce
commit 231dfc9b45
3 changed files with 5 additions and 3 deletions
@@ -669,7 +669,7 @@ export interface WebviewExtensionDescription {
export interface NotebookExtensionDescription {
readonly id: ExtensionIdentifier;
readonly location: UriComponents;
readonly location: UriComponents | undefined;
}
export enum WebviewEditorCapabilities {
@@ -164,7 +164,7 @@ export class InteractiveDocumentContribution extends Disposable implements IWork
};
this._register(notebookService.registerNotebookController('interactive', {
id: new ExtensionIdentifier('interactive.builtin'),
location: URI.parse('interactive://test')
location: undefined
}, controller));
const info = notebookService.getContributedNotebookType('interactive');
@@ -689,7 +689,9 @@ export class NotebookService extends Disposable implements INotebookService {
getNotebookProviderResourceRoots(): URI[] {
const ret: URI[] = [];
this._notebookProviders.forEach(val => {
ret.push(URI.revive(val.extensionData.location));
if (val.extensionData.location) {
ret.push(URI.revive(val.extensionData.location));
}
});
return ret;