Skip to content
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
1 change: 1 addition & 0 deletions news/2 Fixes/9132.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Have sys info show that we have connected to an existing server.
1 change: 1 addition & 0 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
"DataScience.pythonVersionHeader": "Python version:",
"DataScience.pythonRestartHeader": "Restarted kernel:",
"DataScience.pythonNewHeader": "Started new kernel:",
"DataScience.pythonConnectHeader": "Connected to kernel:",
"DataScience.executingCodeFailure": "Executing code failed : {0}",
"DataScience.inputWatermark": "Type code here and press shift-enter to run",
"DataScience.deleteButtonTooltip": "Remove cell",
Expand Down
1 change: 1 addition & 0 deletions src/client/common/utils/localize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ export namespace DataScience {
export const pythonVersionHeader = localize('DataScience.pythonVersionHeader', 'Python Version:');
export const pythonRestartHeader = localize('DataScience.pythonRestartHeader', 'Restarted Kernel:');
export const pythonNewHeader = localize('DataScience.pythonNewHeader', 'Started new kernel:');
export const pythonConnectHeader = localize('DataScience.pythonConnectHeader', 'Connected to kernel:');

export const jupyterSelectURIPrompt = localize(
'DataScience.jupyterSelectURIPrompt',
Expand Down
12 changes: 10 additions & 2 deletions src/client/datascience/interactive-common/interactiveBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,9 @@ export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp
case SysInfoReason.New:
return localize.DataScience.pythonNewHeader();
break;
case SysInfoReason.Connect:
return localize.DataScience.pythonConnectHeader();
break;
default:
traceError('Invalid SysInfoReason');
return '';
Expand Down Expand Up @@ -1479,8 +1482,13 @@ export abstract class InteractiveBase extends WebViewHost<IInteractiveWindowMapp
}
await this.commandManager.executeCommand(Commands.SwitchJupyterKernel, this._notebook);
}
private async kernelChangeHandler(_kernel: IJupyterKernelSpec | LiveKernelModel) {
await this.addSysInfo(SysInfoReason.New);
private async kernelChangeHandler(kernel: IJupyterKernelSpec | LiveKernelModel) {
// Check if we are changing to LiveKernelModel
if (kernel.hasOwnProperty('numberOfConnections')) {
await this.addSysInfo(SysInfoReason.Connect);
} else {
await this.addSysInfo(SysInfoReason.New);
}
}

private openSettings(setting: string | undefined) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ export enum SysInfoReason {
Start,
Restart,
Interrupt,
New
New,
Connect
}

export interface IAddedSysInfo {
Expand Down