mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-21 09:08:53 +01:00
execute by cell-handle, kernel manager has only execute/cancel cells, also "fix" isNotebookCellData fyi @rebornix
This commit is contained in:
@@ -635,17 +635,17 @@ export class ExtHostNotebookController implements ExtHostNotebookShape {
|
||||
createNotebookCellExecution(docUri: vscode.Uri, index: number, kernelId: string): vscode.NotebookCellExecutionTask | undefined {
|
||||
const document = this.lookupNotebookDocument(docUri);
|
||||
if (!document) {
|
||||
throw new Error(`Invalid cell uri / index: ${docUri}, ${index} `);
|
||||
throw new Error(`Invalid uri: ${docUri} `);
|
||||
}
|
||||
|
||||
const cell = document.getCellFromIndex(index);
|
||||
if (!cell) {
|
||||
throw new Error(`Invalid cell uri / index: ${docUri}, ${index} `);
|
||||
throw new Error(`Invalid cell index: ${docUri}, ${index} `);
|
||||
}
|
||||
|
||||
// TODO@roblou also validate kernelId, once kernel has moved from editor to document
|
||||
if (this._activeExecutions.has(cell.uri)) {
|
||||
return;
|
||||
throw new Error(`duplicate execution for ${cell.uri}`);
|
||||
}
|
||||
|
||||
const execution = new NotebookCellExecutionTask(docUri, document, cell, this._notebookDocumentsProxy);
|
||||
|
||||
Reference in New Issue
Block a user