Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

respond to vscode changes #1371

Merged
merged 1 commit into from
May 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { reshapeOutputValueForVsCode } from './common/interfaces/utilities';
import { selectDotNetInteractiveKernelForJupyter } from './common/vscode/commands';
import { ErrorOutputCreator } from './common/interactiveClient';

const executionTasks: Map<string, vscode.NotebookCellExecutionTask> = new Map();
const executionTasks: Map<string, vscode.NotebookCellExecution> = new Map();

const viewType = 'dotnet-interactive';
const legacyViewType = 'dotnet-interactive-legacy';
Expand All @@ -30,7 +30,7 @@ export class DotNetNotebookKernel {
private disposables: { dispose(): void }[] = [];

constructor(readonly config: DotNetNotebookKernelConfiguration) {
const preloads = config.preloadUris.map(uri => new vscode.NotebookKernelPreload(uri));
const preloads = config.preloadUris.map(uri => new vscode.NotebookRendererScript(uri));

// .dib execution
const dibController = vscode.notebook.createNotebookController(
Expand Down Expand Up @@ -110,7 +110,7 @@ export class DotNetNotebookKernel {
}

private async executeCell(cell: vscode.NotebookCell, controller: vscode.NotebookController): Promise<void> {
const executionTask = controller.createNotebookCellExecutionTask(cell);
const executionTask = controller.createNotebookCellExecution(cell);
if (executionTask) {
executionTasks.set(cell.document.uri.toString(), executionTask);
try {
Expand Down Expand Up @@ -193,7 +193,7 @@ export async function updateCellLanguages(document: vscode.NotebookDocument): Pr
await vscode.workspace.applyEdit(edit);
}

async function updateCellOutputs(executionTask: vscode.NotebookCellExecutionTask, cell: vscode.NotebookCell, outputs: Array<vscodeLike.NotebookCellOutput>): Promise<void> {
async function updateCellOutputs(executionTask: vscode.NotebookCellExecution, cell: vscode.NotebookCell, outputs: Array<vscodeLike.NotebookCellOutput>): Promise<void> {
const reshapedOutputs = outputs.map(o => new vscode.NotebookCellOutput(o.outputs.map(oi => generateVsCodeNotebookCellOutputItem(oi.data, oi.mime))));
await executionTask.replaceOutput(reshapedOutputs, cell.index);
}
Expand Down
Loading