File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/vs/workbench/contrib/notebook/common Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import { IConfigurationService } from '../../../../platform/configuration/common
23
23
import { IFileReadLimits } from '../../../../platform/files/common/files.js' ;
24
24
import { ITelemetryService } from '../../../../platform/telemetry/common/telemetry.js' ;
25
25
import { INotebookLoggingService } from './notebookLoggingService.js' ;
26
+ import { parse } from '../../../services/notebook/common/notebookDocumentService.js' ;
26
27
27
28
class NotebookModelReferenceCollection extends ReferenceCollection < Promise < IResolvedNotebookEditorModel > > {
28
29
@@ -207,7 +208,11 @@ export class NotebookModelResolverServiceImpl implements INotebookEditorModelRes
207
208
}
208
209
209
210
if ( uri ?. scheme === CellUri . scheme ) {
210
- throw new Error ( `CANNOT open a cell-uri as notebook. Tried with ${ uri . toString ( ) } ` ) ;
211
+ const originalUri = uri ;
212
+ uri = parse ( uri ) ?. notebook ;
213
+ if ( ! uri ) {
214
+ throw new Error ( `CANNOT open a cell-uri as notebook. Tried with ${ originalUri . toString ( ) } ` ) ;
215
+ }
211
216
}
212
217
213
218
const resource = this . _uriIdentService . asCanonicalUri ( uri ?? this . createUntitledUri ( viewType ! ) ) ;
You can’t perform that action at this time.
0 commit comments