File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ Index: code-editor-src/extensions/sagemaker-extension/src/extension.ts
88===================================================================
99--- /dev/null
1010+++ code-editor-src/extensions/sagemaker-extension/src/extension.ts
11- @@ -0,0 +1,172 @@
11+ @@ -0,0 +1,178 @@
1212+ import * as vscode from 'vscode';
1313+ import * as fs from 'fs';
1414+ import { SessionWarning } from "./sessionWarning";
@@ -166,7 +166,13 @@ Index: code-editor-src/extensions/sagemaker-extension/src/extension.ts
166166+
167167+ export function activate(context: vscode.ExtensionContext) {
168168+
169- + // TODO: log activation of extension
169+ + // this extension will only activate within a sagemaker app
170+ + const isSageMakerApp = !!process.env?.SAGEMAKER_APP_TYPE_LOWERCASE;
171+ + if (!isSageMakerApp) {
172+ + console.log('Skipping activation of Sagemaker Extension...');
173+ + return;
174+ + }
175+ +
170176+ console.log('Activating Sagemaker Extension...');
171177+
172178+ // execute the get cookie command and save the data to cookies
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ Index: code-editor-src/extensions/sagemaker-extensions-sync/src/extension.ts
147147===================================================================
148148--- /dev/null
149149+++ code-editor-src/extensions/sagemaker-extensions-sync/src/extension.ts
150- @@ -0,0 +1,100 @@
150+ @@ -0,0 +1,103 @@
151151+ import * as process from "process";
152152+ import * as vscode from 'vscode';
153153+
@@ -169,9 +169,12 @@ Index: code-editor-src/extensions/sagemaker-extensions-sync/src/extension.ts
169169+ // this extension will only activate within a sagemaker app
170170+ const isSageMakerApp = !!process.env?.SAGEMAKER_APP_TYPE_LOWERCASE;
171171+ if (!isSageMakerApp) {
172+ + console.log('Skipping activation of Sagemaker Extension Sync...');
172173+ return;
173174+ }
174175+
176+ + console.log('Activating Sagemaker Extension Sync...');
177+ +
175178+ // get installed extensions. this could be different from pvExtensions b/c vscode sometimes doesn't delete the assets
176179+ // for an old extension when uninstalling or changing versions
177180+ const installedExtensions = new Set(await getInstalledExtensions());
You can’t perform that action at this time.
0 commit comments