Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -379,3 +379,5 @@ src/Microsoft.DotNet.Interactive.Js/dist/
src/Microsoft.DotNet.Interactive.nteract.js/dist/

src/Microsoft.DotNet.Interactive.nteract.js/lib/

.DS_Store
21 changes: 0 additions & 21 deletions src/dotnet-interactive-vscode/.devcontainer/Dockerfile

This file was deleted.

55 changes: 0 additions & 55 deletions src/dotnet-interactive-vscode/.devcontainer/devcontainer.json

This file was deleted.

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions src/dotnet-interactive-vscode/src/stdioKernelTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
import { ProcessStart } from './interfaces';
import { ReportChannel, Uri } from './interfaces/vscode';
import { LineReader } from './lineReader';
import { isNotNull, parse, stringify } from './utilities';
import { isNotNull, parse, stringify, wait } from './utilities';
import fetch from 'node-fetch';

export class StdioKernelTransport {
Expand Down Expand Up @@ -75,6 +75,7 @@ export class StdioKernelTransport {

public async setExternalUri(externalUri: Uri): Promise<void> {

await wait(2000);
this.externalUri = externalUri;
this.bootstrapperUri = await this.configureTunnel(this.parseUri(`http://localhost:${this.httpPort}`));
if (this.bootstrapperUri === null) {
Expand All @@ -84,7 +85,7 @@ export class StdioKernelTransport {
if (this.bootstrapperUri === null) {
let errorMessage = `No valid bootstrapper uri can be found, .NET Interactive http api for Kernel Process ${this.childProcess?.pid} will not work correctly`;
this.diagnosticChannel.appendLine(errorMessage);
await this.notification.displayError(errorMessage);
this.notification.displayError(errorMessage);
} else {
this.diagnosticChannel.appendLine(`kernel process ${this.childProcess?.pid} configured to use bootstrapper uri ${this.bootstrapperUri.toString()}`);
}
Expand Down
8 changes: 8 additions & 0 deletions src/dotnet-interactive-vscode/src/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,14 @@ export function isNotNull<T>(obj: T | null): obj is T {
return obj !== undefined;
}

export function wait(milliseconds: number): Promise<void> {
return new Promise<void>((resolve => {
setTimeout(() => {
resolve();
}, milliseconds);
}));
}

function performReplacement(template: string, map: { [key: string]: string }): string {
let result = template;
for (let key in map) {
Expand Down