Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/microsoft/vscode.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrebornix <penn.lv@gmail.com>2022-04-14 21:19:50 +0300
committerrebornix <penn.lv@gmail.com>2022-04-14 21:19:50 +0300
commit280050dba576740f0350245409d147aa2c84aa94 (patch)
tree2a70e9f8bec7f42deec1a53fc90ed6dbc0aa5477 /src/vs/workbench/contrib/notebook
parentf20a0f2a10769b0c3eb5da43ba75c12ab44d0d43 (diff)
:lipstick:
Diffstat (limited to 'src/vs/workbench/contrib/notebook')
-rw-r--r--src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts10
-rw-r--r--src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem.ts6
2 files changed, 4 insertions, 12 deletions
diff --git a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts
index 96912b1f10c..40712d1eaa3 100644
--- a/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts
+++ b/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts
@@ -76,7 +76,7 @@ import { CellKind, INotebookSearchOptions, SelectionStateType } from 'vs/workben
import { NOTEBOOK_EDITOR_EDITABLE, NOTEBOOK_EDITOR_FOCUSED, NOTEBOOK_OUTPUT_FOCUSED } from 'vs/workbench/contrib/notebook/common/notebookContextKeys';
import { INotebookExecutionService } from 'vs/workbench/contrib/notebook/common/notebookExecutionService';
import { INotebookExecutionStateService } from 'vs/workbench/contrib/notebook/common/notebookExecutionStateService';
-import { INotebookKernelService, NotebookKernelType } from 'vs/workbench/contrib/notebook/common/notebookKernelService';
+import { INotebookKernelService } from 'vs/workbench/contrib/notebook/common/notebookKernelService';
import { NotebookOptions, OutputInnerContainerTopPadding } from 'vs/workbench/contrib/notebook/common/notebookOptions';
import { mark } from 'vs/workbench/contrib/notebook/common/notebookPerformance';
import { ICellRange } from 'vs/workbench/contrib/notebook/common/notebookRange';
@@ -2112,14 +2112,6 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditorD
return;
}
const { selected } = this.notebookKernelService.getMatchingKernel(this.textModel);
- if (!selected) {
- return;
- }
-
- if (selected.type === NotebookKernelType.Proxy) {
- return;
- }
-
if (!this._webview?.isResolved()) {
await this._resolveWebview();
}
diff --git a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem.ts b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem.ts
index 41e1ec74773..a4060aaa62e 100644
--- a/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem.ts
+++ b/src/vs/workbench/contrib/notebook/browser/viewParts/notebookKernelActionViewItem.ts
@@ -6,14 +6,14 @@
import 'vs/css!./notebookKernelActionViewItem';
import { ActionViewItem } from 'vs/base/browser/ui/actionbar/actionViewItems';
import { Action, IAction } from 'vs/base/common/actions';
+import { DisposableStore } from 'vs/base/common/lifecycle';
import { localize } from 'vs/nls';
import { ThemeIcon } from 'vs/platform/theme/common/themeService';
import { selectKernelIcon } from 'vs/workbench/contrib/notebook/browser/notebookIcons';
-import { INotebookKernelMatchResult, INotebookKernelService, ProxyKernelState } from 'vs/workbench/contrib/notebook/common/notebookKernelService';
+import { INotebookKernelMatchResult, INotebookKernelService, NotebookKernelType, ProxyKernelState } from 'vs/workbench/contrib/notebook/common/notebookKernelService';
import { Event } from 'vs/base/common/event';
import { NotebookTextModel } from 'vs/workbench/contrib/notebook/common/model/notebookTextModel';
import { INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
-import { DisposableStore } from 'vs/base/common/lifecycle';
export class NotebooKernelActionViewItem extends ActionViewItem {
@@ -77,7 +77,7 @@ export class NotebooKernelActionViewItem extends ActionViewItem {
// special UI for selected kernel?
}
- if ('resolveKernel' in selectedOrSuggested) {
+ if (selectedOrSuggested.type === NotebookKernelType.Proxy) {
if (selectedOrSuggested.connectionState === ProxyKernelState.Initializing) {
this._action.label = localize('initializing', "Initializing...");
} else {