From 82b3d55a8abae7d5bbc1ffb1ba0d3bef947c3023 Mon Sep 17 00:00:00 2001 From: Newton Der Date: Fri, 5 Dec 2025 12:58:41 -0800 Subject: [PATCH 1/5] Fix idle shutdown when active process is still running --- .../sagemaker/sagemaker-idle-extension.diff | 169 +++++++++--------- 1 file changed, 80 insertions(+), 89 deletions(-) diff --git a/patches/sagemaker/sagemaker-idle-extension.diff b/patches/sagemaker/sagemaker-idle-extension.diff index d6950a2..cd6b7e0 100644 --- a/patches/sagemaker/sagemaker-idle-extension.diff +++ b/patches/sagemaker/sagemaker-idle-extension.diff @@ -1,16 +1,16 @@ -Index: third-party-src/extensions/sagemaker-idle-extension/README.md +Index: code-editor-src/extensions/sagemaker-idle-extension/README.md =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/README.md ++++ code-editor-src/extensions/sagemaker-idle-extension/README.md @@ -0,0 +1,3 @@ +# Code Editor Idle Extension + +The Code Editor Idle Extension tracks user activity and logs the last active timestamp (in UTC) to a local file. User activities monitored include file changes, text editor selection changes, and terminal interactions. Additionally, it provides an API endpoint `/api/idle` that returns the lastActiveTimestamp. \ No newline at end of file -Index: third-party-src/extensions/sagemaker-idle-extension/extension-browser.webpack.config.js +Index: code-editor-src/extensions/sagemaker-idle-extension/extension-browser.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/extension-browser.webpack.config.js ++++ code-editor-src/extensions/sagemaker-idle-extension/extension-browser.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -29,10 +29,10 @@ Index: third-party-src/extensions/sagemaker-idle-extension/extension-browser.web + extension: './src/extension.ts' + }, +}); -Index: third-party-src/extensions/sagemaker-idle-extension/extension.webpack.config.js +Index: code-editor-src/extensions/sagemaker-idle-extension/extension.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/extension.webpack.config.js ++++ code-editor-src/extensions/sagemaker-idle-extension/extension.webpack.config.js @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -54,10 +54,10 @@ Index: third-party-src/extensions/sagemaker-idle-extension/extension.webpack.con + extension: './src/extension.ts', + } +}); -Index: third-party-src/extensions/sagemaker-idle-extension/package.json +Index: code-editor-src/extensions/sagemaker-idle-extension/package.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/package.json ++++ code-editor-src/extensions/sagemaker-idle-extension/package.json @@ -0,0 +1,43 @@ +{ + "name": "sagemaker-idle-extension", @@ -102,10 +102,10 @@ Index: third-party-src/extensions/sagemaker-idle-extension/package.json + "dependencies": {}, + "repository": {} +} -Index: third-party-src/extensions/sagemaker-idle-extension/tsconfig.json +Index: code-editor-src/extensions/sagemaker-idle-extension/tsconfig.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/tsconfig.json ++++ code-editor-src/extensions/sagemaker-idle-extension/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.base.json", @@ -117,10 +117,10 @@ Index: third-party-src/extensions/sagemaker-idle-extension/tsconfig.json + "../../src/vscode-dts/vscode.d.ts" + ] +} -Index: third-party-src/extensions/sagemaker-idle-extension/.vscodeignore +Index: code-editor-src/extensions/sagemaker-idle-extension/.vscodeignore =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/.vscodeignore ++++ code-editor-src/extensions/sagemaker-idle-extension/.vscodeignore @@ -0,0 +1,11 @@ +.vscode/** +.vscode-test/** @@ -133,19 +133,16 @@ Index: third-party-src/extensions/sagemaker-idle-extension/.vscodeignore +out/** +cgmanifest.json +preview-src/** -Index: third-party-src/extensions/sagemaker-idle-extension/src/extension.ts +Index: code-editor-src/extensions/sagemaker-idle-extension/src/extension.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-idle-extension/src/extension.ts -@@ -0,0 +1,112 @@ ++++ code-editor-src/extensions/sagemaker-idle-extension/src/extension.ts +@@ -0,0 +1,59 @@ +import * as vscode from "vscode"; +import * as fs from "fs"; +import * as path from "path"; + -+let idleFilePath: string -+let terminalActivityInterval: NodeJS.Timeout | undefined -+const LOG_PREFIX = "[sagemaker-idle-extension]" -+const CHECK_INTERVAL = 60000; // 60 seconds interval ++let idleFilePath: string; + +export function activate(context: vscode.ExtensionContext) { + initializeIdleFilePath(); @@ -153,22 +150,18 @@ Index: third-party-src/extensions/sagemaker-idle-extension/src/extension.ts + startMonitoringTerminalActivity(); +} + -+export function deactivate() { -+ if(terminalActivityInterval) { -+ clearInterval(terminalActivityInterval) -+ } -+} ++export function deactivate() {} + +/** + * Initializes the file path where the idle timestamp will be stored. + * It sets the path to a hidden file in the /tmp/ directory. + */ +function initializeIdleFilePath() { -+ const tmpDirectory = "/tmp/"; ++ const tmpDirectory = "/tmp/"; + idleFilePath = path.join(tmpDirectory, ".sagemaker-last-active-timestamp"); + + // Set initial lastActivetimestamp -+ updateLastActivityTimestamp() ++ updateLastActivityTimestamp(); +} + +/** @@ -197,52 +190,6 @@ Index: third-party-src/extensions/sagemaker-idle-extension/src/extension.ts +} + +/** -+ * Starts monitoring terminal activity by setting an interval to check for activity in the /dev/pts directory. -+ */ -+const startMonitoringTerminalActivity = () => { -+ terminalActivityInterval = setInterval(checkTerminalActivity, CHECK_INTERVAL); -+}; -+ -+ -+/** -+ * Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files. -+ * -+ * The /dev/pts directory is used in Unix-like operating systems to represent pseudo-terminal (PTY) devices. -+ * Each active terminal session is assigned a PTY device. These devices are represented as files within the /dev/pts directory. -+ * When a terminal session has activity, such as when a user inputs commands or output is written to the terminal, -+ * the modification time (mtime) of the corresponding PTY device file is updated. By monitoring the modification -+ * times of the files in the /dev/pts directory, we can detect terminal activity. -+ * -+ * If activity is detected (i.e., if any PTY device file was modified within the CHECK_INTERVAL), this function -+ * updates the last activity timestamp. -+ */ -+const checkTerminalActivity = () => { -+ fs.readdir("/dev/pts", (err, files) => { -+ if (err) { -+ console.error(`${LOG_PREFIX} Error reading /dev/pts directory:`, err); -+ return; -+ } -+ -+ const now = Date.now(); -+ const activityDetected = files.some((file) => { -+ const filePath = path.join("/dev/pts", file); -+ try { -+ const stats = fs.statSync(filePath); -+ const mtime = new Date(stats.mtime).getTime(); -+ return now - mtime < CHECK_INTERVAL; -+ } catch (error) { -+ console.error(`${LOG_PREFIX} Error reading file stats:`, error); -+ return false; -+ } -+ }); -+ -+ if (activityDetected) { -+ updateLastActivityTimestamp(); -+ } -+ }); -+}; -+ -+/** + * Updates the last activity timestamp by recording the current timestamp in the idle file and + * refreshing the status bar. The timestamp should be in ISO 8601 format and set to the UTC timezone. + */ @@ -251,10 +198,10 @@ Index: third-party-src/extensions/sagemaker-idle-extension/src/extension.ts + fs.writeFileSync(idleFilePath, timestamp); +} \ No newline at end of file -Index: third-party-src/build/gulpfile.extensions.js +Index: code-editor-src/build/gulpfile.extensions.js =================================================================== ---- third-party-src.orig/build/gulpfile.extensions.js -+++ third-party-src/build/gulpfile.extensions.js +--- code-editor-src.orig/build/gulpfile.extensions.js ++++ code-editor-src/build/gulpfile.extensions.js @@ -61,6 +61,7 @@ const compilations = [ 'extensions/search-result/tsconfig.json', 'extensions/simple-browser/tsconfig.json', @@ -263,10 +210,10 @@ Index: third-party-src/build/gulpfile.extensions.js 'extensions/tunnel-forwarding/tsconfig.json', 'extensions/typescript-language-features/test-workspace/tsconfig.json', 'extensions/typescript-language-features/web/tsconfig.json', -Index: third-party-src/build/npm/dirs.js +Index: code-editor-src/build/npm/dirs.js =================================================================== ---- third-party-src.orig/build/npm/dirs.js -+++ third-party-src/build/npm/dirs.js +--- code-editor-src.orig/build/npm/dirs.js ++++ code-editor-src/build/npm/dirs.js @@ -39,6 +39,7 @@ const dirs = [ 'extensions/php-language-features', 'extensions/references-view', @@ -275,28 +222,68 @@ Index: third-party-src/build/npm/dirs.js 'extensions/search-result', 'extensions/simple-browser', 'extensions/tunnel-forwarding', -Index: third-party-src/src/vs/server/node/webClientServer.ts +Index: code-editor-src/src/vs/server/node/webClientServer.ts =================================================================== ---- third-party-src.orig/src/vs/server/node/webClientServer.ts -+++ third-party-src/src/vs/server/node/webClientServer.ts -@@ -3,7 +3,7 @@ +--- code-editor-src.orig/src/vs/server/node/webClientServer.ts ++++ code-editor-src/src/vs/server/node/webClientServer.ts +@@ -3,8 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createReadStream, promises } from 'fs'; -+import { createReadStream, promises, existsSync, writeFileSync } from 'fs'; ++import { createReadStream, promises, existsSync, readdirSync, statSync, writeFileSync } from 'fs'; import * as http from 'http'; ++import * as path from 'path'; import * as url from 'url'; import * as cookie from 'cookie'; -@@ -96,6 +96,7 @@ const APP_ROOT = dirname(FileAccess.asFi + import * as crypto from 'crypto'; +@@ -91,11 +92,45 @@ export async function serveFile(filePath + } + } + ++const CHECK_INTERVAL = 60000; // 60 seconds interval + const APP_ROOT = dirname(FileAccess.asFileUri('').fsPath); + const STATIC_PATH = `/static`; const CALLBACK_PATH = `/callback`; const WEB_EXTENSION_PATH = `/web-extension-resource`; +const IDLE_EXTENSION_PATH = `/api/idle`; ++ ++/** ++ * Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files. ++ * ++ * The /dev/pts directory is used in Unix-like operating systems to represent pseudo-terminal (PTY) devices. ++ * Each active terminal session is assigned a PTY device. These devices are represented as files within the /dev/pts directory. ++ * When a terminal session has activity, such as when a user inputs commands or output is written to the terminal, ++ * the modification time (mtime) of the corresponding PTY device file is updated. By monitoring the modification ++ * times of the files in the /dev/pts directory, we can detect terminal activity. ++ * ++ * If activity is detected (i.e., if any PTY device file was modified within the CHECK_INTERVAL), this function ++ * updates the last activity timestamp. ++ */ ++function checkTerminalActivity(idleFilePath: string) { ++ try { ++ const files: string[] = readdirSync('/dev/pts'); ++ const now = new Date(); ++ ++ const activityDetected = files.some((file: string) => { ++ const filePath = path.join('/dev/pts', file); ++ const stats = statSync(filePath); ++ const mtime = new Date(stats.mtime).getTime(); ++ return now.getTime() - mtime < CHECK_INTERVAL; ++ }); ++ ++ if (activityDetected) { ++ writeFileSync(idleFilePath, now.toISOString()); ++ } ++ } catch (err) { ++ console.error('Error checking terminal activity:', err); ++ } ++} export class WebClientServer { -@@ -133,6 +134,9 @@ export class WebClientServer { +@@ -133,6 +168,9 @@ export class WebClientServer { // callback support return this._handleCallback(res); } @@ -306,7 +293,7 @@ Index: third-party-src/src/vs/server/node/webClientServer.ts if (pathname.startsWith(WEB_EXTENSION_PATH) && pathname.charCodeAt(WEB_EXTENSION_PATH.length) === CharCode.Slash) { // extension resource support return this._handleWebExtensionResource(req, res, pathname.substring(WEB_EXTENSION_PATH.length)); -@@ -505,6 +509,31 @@ export class WebClientServer { +@@ -505,6 +543,33 @@ export class WebClientServer { }); return void res.end(data); } @@ -318,16 +305,18 @@ Index: third-party-src/src/vs/server/node/webClientServer.ts + try { + const tmpDirectory = '/tmp/' + const idleFilePath = join(tmpDirectory, '.sagemaker-last-active-timestamp'); -+ ++ + // If idle shutdown file does not exist, this indicates the app UI may never been opened + // Create the initial metadata file + if (!existsSync(idleFilePath)) { + const timestamp = new Date().toISOString(); + writeFileSync(idleFilePath, timestamp); + } -+ ++ ++ checkTerminalActivity(idleFilePath); ++ + const data = await promises.readFile(idleFilePath, 'utf8'); -+ ++ + res.statusCode = 200; + res.setHeader('Content-Type', 'application/json'); + res.end(JSON.stringify({ lastActiveTimestamp: data })); @@ -336,3 +325,5 @@ Index: third-party-src/src/vs/server/node/webClientServer.ts + } + } } + + From 03e55a8d8c7ed5db4dd944224b52f3cee69912e1 Mon Sep 17 00:00:00 2001 From: Newton Der Date: Fri, 5 Dec 2025 13:02:54 -0800 Subject: [PATCH 2/5] Remove call to startMonitoringTerminalActivity --- patches/sagemaker/sagemaker-idle-extension.diff | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/patches/sagemaker/sagemaker-idle-extension.diff b/patches/sagemaker/sagemaker-idle-extension.diff index cd6b7e0..68f0bf3 100644 --- a/patches/sagemaker/sagemaker-idle-extension.diff +++ b/patches/sagemaker/sagemaker-idle-extension.diff @@ -137,7 +137,7 @@ Index: code-editor-src/extensions/sagemaker-idle-extension/src/extension.ts =================================================================== --- /dev/null +++ code-editor-src/extensions/sagemaker-idle-extension/src/extension.ts -@@ -0,0 +1,59 @@ +@@ -0,0 +1,58 @@ +import * as vscode from "vscode"; +import * as fs from "fs"; +import * as path from "path"; @@ -147,7 +147,6 @@ Index: code-editor-src/extensions/sagemaker-idle-extension/src/extension.ts +export function activate(context: vscode.ExtensionContext) { + initializeIdleFilePath(); + registerEventListeners(context); -+ startMonitoringTerminalActivity(); +} + +export function deactivate() {} From 6d414cd106be11b547260a5fcbf514074e02bbf2 Mon Sep 17 00:00:00 2001 From: Newton Der Date: Fri, 5 Dec 2025 13:07:58 -0800 Subject: [PATCH 3/5] Update subsequent patches in series --- patches/sagemaker/fix-port-forwarding.diff | 6 +- .../sagemaker/post-startup-notifications.diff | 84 +++++++++---------- .../sagemaker-extension-smus-support.diff | 12 +-- .../sagemaker/sagemaker-extensions-sync.diff | 50 +++++------ .../sagemaker-open-notebook-extension.diff | 66 +++++++-------- .../sagemaker/sagemaker-ui-dark-theme.diff | 59 +++++++------ .../sagemaker/sagemaker-ui-post-startup.diff | 29 +++---- .../sagemaker/terminal-crash-mitigation.diff | 40 ++++----- 8 files changed, 168 insertions(+), 178 deletions(-) diff --git a/patches/sagemaker/fix-port-forwarding.diff b/patches/sagemaker/fix-port-forwarding.diff index 6d6f803..f531ec6 100644 --- a/patches/sagemaker/fix-port-forwarding.diff +++ b/patches/sagemaker/fix-port-forwarding.diff @@ -1,7 +1,7 @@ -Index: third-party-src/src/vs/code/browser/workbench/workbench.ts +Index: code-editor-src/src/vs/code/browser/workbench/workbench.ts =================================================================== ---- third-party-src.orig/src/vs/code/browser/workbench/workbench.ts -+++ third-party-src/src/vs/code/browser/workbench/workbench.ts +--- code-editor-src.orig/src/vs/code/browser/workbench/workbench.ts ++++ code-editor-src/src/vs/code/browser/workbench/workbench.ts @@ -635,7 +635,7 @@ function readCookie(name: string): strin const localhostMatch = extractLocalHostUriMetaDataForPortMapping(resolvedUri) if (localhostMatch && resolvedUri.authority !== location.host) { diff --git a/patches/sagemaker/post-startup-notifications.diff b/patches/sagemaker/post-startup-notifications.diff index 482661b..168b6e6 100644 --- a/patches/sagemaker/post-startup-notifications.diff +++ b/patches/sagemaker/post-startup-notifications.diff @@ -1,17 +1,17 @@ -Index: third-party-src/extensions/post-startup-notifications/.vscode/extensions.json +Index: code-editor-src/extensions/post-startup-notifications/.vscode/extensions.json =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/.vscode/extensions.json ++++ code-editor-src/extensions/post-startup-notifications/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": ["dbaeumer.vscode-eslint", "amodio.tsl-problem-matcher", "ms-vscode.extension-test-runner"] +} -Index: third-party-src/extensions/post-startup-notifications/.vscode/launch.json +Index: code-editor-src/extensions/post-startup-notifications/.vscode/launch.json =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/.vscode/launch.json ++++ code-editor-src/extensions/post-startup-notifications/.vscode/launch.json @@ -0,0 +1,21 @@ +// A launch configuration that compiles the extension and then opens it inside a new window +// Use IntelliSense to learn about possible attributes. @@ -35,10 +35,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscode/launch.json + ] +} \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/.vscode/settings.json +Index: code-editor-src/extensions/post-startup-notifications/.vscode/settings.json =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/.vscode/settings.json ++++ code-editor-src/extensions/post-startup-notifications/.vscode/settings.json @@ -0,0 +1,13 @@ +// Place your settings in this file to overwrite default and user settings. +{ @@ -54,10 +54,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscode/settings.js + "typescript.tsc.autoDetect": "off" +} \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/.vscode/tasks.json +Index: code-editor-src/extensions/post-startup-notifications/.vscode/tasks.json =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/.vscode/tasks.json ++++ code-editor-src/extensions/post-startup-notifications/.vscode/tasks.json @@ -0,0 +1,40 @@ +// See https://go.microsoft.com/fwlink/?LinkId=733558 +// for the documentation about the tasks.json format @@ -100,10 +100,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscode/tasks.json + ] +} \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/.vscodeignore +Index: code-editor-src/extensions/post-startup-notifications/.vscodeignore =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/.vscodeignore ++++ code-editor-src/extensions/post-startup-notifications/.vscodeignore @@ -0,0 +1,14 @@ +.vscode/** +.vscode-test/** @@ -119,10 +119,10 @@ Index: third-party-src/extensions/post-startup-notifications/.vscodeignore +**/*.map +**/*.ts +**/.vscode-test.* -Index: third-party-src/extensions/post-startup-notifications/CHANGELOG.md +Index: code-editor-src/extensions/post-startup-notifications/CHANGELOG.md =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/CHANGELOG.md ++++ code-editor-src/extensions/post-startup-notifications/CHANGELOG.md @@ -0,0 +1,9 @@ +# Change Log + @@ -134,19 +134,19 @@ Index: third-party-src/extensions/post-startup-notifications/CHANGELOG.md + +- Initial release \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/README.md +Index: code-editor-src/extensions/post-startup-notifications/README.md =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/README.md ++++ code-editor-src/extensions/post-startup-notifications/README.md @@ -0,0 +1,4 @@ +# post-startup-notifications README + +This extension monitors post startup script execution and notifies users on success/failure. + -Index: third-party-src/extensions/post-startup-notifications/eslint.config.mjs +Index: code-editor-src/extensions/post-startup-notifications/eslint.config.mjs =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/eslint.config.mjs ++++ code-editor-src/extensions/post-startup-notifications/eslint.config.mjs @@ -0,0 +1,28 @@ +import typescriptEslint from "@typescript-eslint/eslint-plugin"; +import tsParser from "@typescript-eslint/parser"; @@ -177,10 +177,10 @@ Index: third-party-src/extensions/post-startup-notifications/eslint.config.mjs + }, +}]; \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/package.json +Index: code-editor-src/extensions/post-startup-notifications/package.json =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/package.json ++++ code-editor-src/extensions/post-startup-notifications/package.json @@ -0,0 +1,57 @@ +{ + "name": "post-startup-notifications", @@ -240,19 +240,19 @@ Index: third-party-src/extensions/post-startup-notifications/package.json + } +} \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/src/constant.ts +Index: code-editor-src/extensions/post-startup-notifications/src/constant.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/src/constant.ts ++++ code-editor-src/extensions/post-startup-notifications/src/constant.ts @@ -0,0 +1,3 @@ +export const POST_START_UP_STATUS_FILE = '/tmp/.post-startup-status.json'; +export const SERVICE_NAME_ENV_VALUE = 'SageMakerUnifiedStudio'; +export const SERVICE_NAME_ENV_KEY = 'SERVICE_NAME'; \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/src/extension.ts +Index: code-editor-src/extensions/post-startup-notifications/src/extension.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/src/extension.ts ++++ code-editor-src/extensions/post-startup-notifications/src/extension.ts @@ -0,0 +1,117 @@ +import * as vscode from 'vscode'; +import * as fs from 'fs'; @@ -371,10 +371,10 @@ Index: third-party-src/extensions/post-startup-notifications/src/extension.ts + outputChannel.dispose(); + } +} -Index: third-party-src/extensions/post-startup-notifications/src/test/extension.test.ts +Index: code-editor-src/extensions/post-startup-notifications/src/test/extension.test.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/src/test/extension.test.ts ++++ code-editor-src/extensions/post-startup-notifications/src/test/extension.test.ts @@ -0,0 +1,267 @@ +import * as vscode from 'vscode'; +import * as fs from 'fs'; @@ -643,10 +643,10 @@ Index: third-party-src/extensions/post-startup-notifications/src/test/extension. + }); +}); + -Index: third-party-src/extensions/post-startup-notifications/src/types.ts +Index: code-editor-src/extensions/post-startup-notifications/src/types.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/src/types.ts ++++ code-editor-src/extensions/post-startup-notifications/src/types.ts @@ -0,0 +1,6 @@ +export interface StatusFile { + status: string; @@ -655,10 +655,10 @@ Index: third-party-src/extensions/post-startup-notifications/src/types.ts + label: string; +} \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/tsconfig.json +Index: code-editor-src/extensions/post-startup-notifications/tsconfig.json =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/tsconfig.json ++++ code-editor-src/extensions/post-startup-notifications/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { @@ -678,10 +678,10 @@ Index: third-party-src/extensions/post-startup-notifications/tsconfig.json + } +} \ No newline at end of file -Index: third-party-src/extensions/post-startup-notifications/webpack.config.js +Index: code-editor-src/extensions/post-startup-notifications/webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/webpack.config.js ++++ code-editor-src/extensions/post-startup-notifications/webpack.config.js @@ -0,0 +1,48 @@ +//@ts-check + @@ -732,11 +732,11 @@ Index: third-party-src/extensions/post-startup-notifications/webpack.config.js +}; +module.exports = [extensionConfig]; \ No newline at end of file -Index: third-party-src/build/npm/dirs.js +Index: code-editor-src/build/npm/dirs.js =================================================================== ---- third-party-src.orig/build/npm/dirs.js -+++ third-party-src/build/npm/dirs.js -@@ -42,6 +42,7 @@ const dirs = [ +--- code-editor-src.orig/build/npm/dirs.js ++++ code-editor-src/build/npm/dirs.js +@@ -43,6 +43,7 @@ const dirs = [ 'extensions/sagemaker-terminal-crash-mitigation', 'extensions/sagemaker-open-notebook-extension', 'extensions/sagemaker-ui-dark-theme', @@ -744,11 +744,11 @@ Index: third-party-src/build/npm/dirs.js 'extensions/search-result', 'extensions/simple-browser', 'extensions/tunnel-forwarding', -Index: third-party-src/build/gulpfile.extensions.js +Index: code-editor-src/build/gulpfile.extensions.js =================================================================== ---- third-party-src.orig/build/gulpfile.extensions.js -+++ third-party-src/build/gulpfile.extensions.js -@@ -64,6 +64,7 @@ const compilations = [ +--- code-editor-src.orig/build/gulpfile.extensions.js ++++ code-editor-src/build/gulpfile.extensions.js +@@ -65,6 +65,7 @@ const compilations = [ 'extensions/sagemaker-terminal-crash-mitigation/tsconfig.json', 'extensions/sagemaker-open-notebook-extension/tsconfig.json', 'extensions/sagemaker-ui-dark-theme/tsconfig.json', @@ -756,10 +756,10 @@ Index: third-party-src/build/gulpfile.extensions.js 'extensions/tunnel-forwarding/tsconfig.json', 'extensions/typescript-language-features/test-workspace/tsconfig.json', 'extensions/typescript-language-features/web/tsconfig.json', -Index: third-party-src/extensions/post-startup-notifications/extension-browser.webpack.config.js +Index: code-editor-src/extensions/post-startup-notifications/extension-browser.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/extension-browser.webpack.config.js ++++ code-editor-src/extensions/post-startup-notifications/extension-browser.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -778,10 +778,10 @@ Index: third-party-src/extensions/post-startup-notifications/extension-browser.w + extension: './src/extension.ts' + }, +}); -Index: third-party-src/extensions/post-startup-notifications/extension.webpack.config.js +Index: code-editor-src/extensions/post-startup-notifications/extension.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/post-startup-notifications/extension.webpack.config.js ++++ code-editor-src/extensions/post-startup-notifications/extension.webpack.config.js @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. diff --git a/patches/sagemaker/sagemaker-extension-smus-support.diff b/patches/sagemaker/sagemaker-extension-smus-support.diff index 0cff797..275acf9 100644 --- a/patches/sagemaker/sagemaker-extension-smus-support.diff +++ b/patches/sagemaker/sagemaker-extension-smus-support.diff @@ -1,7 +1,7 @@ -Index: third-party-src/extensions/sagemaker-extension/src/constant.ts +Index: code-editor-src/extensions/sagemaker-extension/src/constant.ts =================================================================== ---- third-party-src.orig/extensions/sagemaker-extension/src/constant.ts -+++ third-party-src/extensions/sagemaker-extension/src/constant.ts +--- code-editor-src.orig/extensions/sagemaker-extension/src/constant.ts ++++ code-editor-src/extensions/sagemaker-extension/src/constant.ts @@ -27,6 +27,10 @@ export const FIVE_MINUTES_INTERVAL_MILLI export const SAGEMAKER_METADATA_PATH = '/opt/ml/metadata/resource-metadata.json'; @@ -63,10 +63,10 @@ Index: third-party-src/extensions/sagemaker-extension/src/constant.ts + + return `https://${DataZoneDomainId}.sagemaker.${DataZoneDomainRegion}.on.aws/projects/${DataZoneProjectId}/overview`; +} -Index: third-party-src/extensions/sagemaker-extension/src/extension.ts +Index: code-editor-src/extensions/sagemaker-extension/src/extension.ts =================================================================== ---- third-party-src.orig/extensions/sagemaker-extension/src/extension.ts -+++ third-party-src/extensions/sagemaker-extension/src/extension.ts +--- code-editor-src.orig/extensions/sagemaker-extension/src/extension.ts ++++ code-editor-src/extensions/sagemaker-extension/src/extension.ts @@ -11,7 +11,8 @@ import { WARNING_BUTTON_SAVE_AND_RENEW_SESSION, SagemakerCookie, diff --git a/patches/sagemaker/sagemaker-extensions-sync.diff b/patches/sagemaker/sagemaker-extensions-sync.diff index 599587f..819b5bd 100644 --- a/patches/sagemaker/sagemaker-extensions-sync.diff +++ b/patches/sagemaker/sagemaker-extensions-sync.diff @@ -1,7 +1,7 @@ -Index: third-party-src/build/gulpfile.extensions.js +Index: code-editor-src/build/gulpfile.extensions.js =================================================================== ---- third-party-src.orig/build/gulpfile.extensions.js -+++ third-party-src/build/gulpfile.extensions.js +--- code-editor-src.orig/build/gulpfile.extensions.js ++++ code-editor-src/build/gulpfile.extensions.js @@ -63,6 +63,7 @@ const compilations = [ 'extensions/sagemaker-extension/tsconfig.json', 'extensions/sagemaker-idle-extension/tsconfig.json', @@ -10,10 +10,10 @@ Index: third-party-src/build/gulpfile.extensions.js 'extensions/sagemaker-open-notebook-extension/tsconfig.json', 'extensions/sagemaker-ui-dark-theme/tsconfig.json', 'extensions/post-startup-notifications/tsconfig.json', -Index: third-party-src/build/npm/dirs.js +Index: code-editor-src/build/npm/dirs.js =================================================================== ---- third-party-src.orig/build/npm/dirs.js -+++ third-party-src/build/npm/dirs.js +--- code-editor-src.orig/build/npm/dirs.js ++++ code-editor-src/build/npm/dirs.js @@ -41,6 +41,7 @@ const dirs = [ 'extensions/sagemaker-extension', 'extensions/sagemaker-idle-extension', @@ -22,10 +22,10 @@ Index: third-party-src/build/npm/dirs.js 'extensions/sagemaker-open-notebook-extension', 'extensions/sagemaker-ui-dark-theme', 'extensions/post-startup-notifications', -Index: third-party-src/extensions/sagemaker-extensions-sync/.vscodeignore +Index: code-editor-src/extensions/sagemaker-extensions-sync/.vscodeignore =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/.vscodeignore ++++ code-editor-src/extensions/sagemaker-extensions-sync/.vscodeignore @@ -0,0 +1,11 @@ +.vscode/** +.vscode-test/** @@ -38,19 +38,19 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/.vscodeignore +out/** +cgmanifest.json +preview-src/** -Index: third-party-src/extensions/sagemaker-extensions-sync/README.md +Index: code-editor-src/extensions/sagemaker-extensions-sync/README.md =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/README.md ++++ code-editor-src/extensions/sagemaker-extensions-sync/README.md @@ -0,0 +1,3 @@ +# SageMaker Code Editor Extensions Sync + +Notifies users if the extensions directory is missing pre-packaged extensions from SageMaker Distribution and give them the option to sync them. \ No newline at end of file -Index: third-party-src/extensions/sagemaker-extensions-sync/extension-browser.webpack.config.js +Index: code-editor-src/extensions/sagemaker-extensions-sync/extension-browser.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/extension-browser.webpack.config.js ++++ code-editor-src/extensions/sagemaker-extensions-sync/extension-browser.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -69,10 +69,10 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/extension-browser.we + extension: './src/extension.ts' + }, +}); -Index: third-party-src/extensions/sagemaker-extensions-sync/extension.webpack.config.js +Index: code-editor-src/extensions/sagemaker-extensions-sync/extension.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/extension.webpack.config.js ++++ code-editor-src/extensions/sagemaker-extensions-sync/extension.webpack.config.js @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -94,10 +94,10 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/extension.webpack.co + extension: './src/extension.ts', + } +}); -Index: third-party-src/extensions/sagemaker-extensions-sync/package.json +Index: code-editor-src/extensions/sagemaker-extensions-sync/package.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/package.json ++++ code-editor-src/extensions/sagemaker-extensions-sync/package.json @@ -0,0 +1,44 @@ +{ + "name": "sagemaker-extensions-sync", @@ -143,10 +143,10 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/package.json + "dependencies": {}, + "repository": {} +} -Index: third-party-src/extensions/sagemaker-extensions-sync/src/constants.ts +Index: code-editor-src/extensions/sagemaker-extensions-sync/src/constants.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/src/constants.ts ++++ code-editor-src/extensions/sagemaker-extensions-sync/src/constants.ts @@ -0,0 +1,21 @@ +// constants +export const PERSISTENT_VOLUME_EXTENSIONS_DIR = "/home/sagemaker-user/sagemaker-code-editor-server-data/extensions"; @@ -169,10 +169,10 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/src/constants.ts + return `ExtensionInfo: ${this.identifier} (${this.path})`; + } +} -Index: third-party-src/extensions/sagemaker-extensions-sync/src/extension.ts +Index: code-editor-src/extensions/sagemaker-extensions-sync/src/extension.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/src/extension.ts ++++ code-editor-src/extensions/sagemaker-extensions-sync/src/extension.ts @@ -0,0 +1,100 @@ +import * as process from "process"; +import * as vscode from 'vscode'; @@ -275,10 +275,10 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/src/extension.ts + } +} \ No newline at end of file -Index: third-party-src/extensions/sagemaker-extensions-sync/tsconfig.json +Index: code-editor-src/extensions/sagemaker-extensions-sync/tsconfig.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/tsconfig.json ++++ code-editor-src/extensions/sagemaker-extensions-sync/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.base.json", @@ -290,10 +290,10 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/tsconfig.json + "../../src/vscode-dts/vscode.d.ts" + ] +} -Index: third-party-src/extensions/sagemaker-extensions-sync/src/utils.ts +Index: code-editor-src/extensions/sagemaker-extensions-sync/src/utils.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-extensions-sync/src/utils.ts ++++ code-editor-src/extensions/sagemaker-extensions-sync/src/utils.ts @@ -0,0 +1,168 @@ +import * as fs from "fs/promises"; +import * as path from "path"; @@ -463,4 +463,4 @@ Index: third-party-src/extensions/sagemaker-extensions-sync/src/utils.ts + console.error(`${LOG_PREFIX} ${error}`); + } +} -\ No newline at end of file \ No newline at end of file +\ No newline at end of file diff --git a/patches/sagemaker/sagemaker-open-notebook-extension.diff b/patches/sagemaker/sagemaker-open-notebook-extension.diff index 19e932c..0b22b87 100644 --- a/patches/sagemaker/sagemaker-open-notebook-extension.diff +++ b/patches/sagemaker/sagemaker-open-notebook-extension.diff @@ -1,37 +1,35 @@ -Index: third-party-src/build/gulpfile.extensions.js +Index: code-editor-src/build/gulpfile.extensions.js =================================================================== ---- third-party-src.orig/build/gulpfile.extensions.js -+++ third-party-src/build/gulpfile.extensions.js -@@ -61,6 +61,7 @@ const compilations = [ - 'extensions/simple-browser/tsconfig.json', +--- code-editor-src.orig/build/gulpfile.extensions.js ++++ code-editor-src/build/gulpfile.extensions.js +@@ -63,6 +63,7 @@ const compilations = [ 'extensions/sagemaker-extension/tsconfig.json', + 'extensions/sagemaker-idle-extension/tsconfig.json', 'extensions/sagemaker-terminal-crash-mitigation/tsconfig.json', + 'extensions/sagemaker-open-notebook-extension/tsconfig.json', 'extensions/tunnel-forwarding/tsconfig.json', 'extensions/typescript-language-features/test-workspace/tsconfig.json', 'extensions/typescript-language-features/web/tsconfig.json', -Index: third-party-src/build/npm/dirs.js +Index: code-editor-src/build/npm/dirs.js =================================================================== ---- third-party-src.orig/build/npm/dirs.js -+++ third-party-src/build/npm/dirs.js -@@ -39,6 +39,7 @@ const dirs = [ - 'extensions/references-view', +--- code-editor-src.orig/build/npm/dirs.js ++++ code-editor-src/build/npm/dirs.js +@@ -41,6 +41,7 @@ const dirs = [ 'extensions/sagemaker-extension', + 'extensions/sagemaker-idle-extension', 'extensions/sagemaker-terminal-crash-mitigation', + 'extensions/sagemaker-open-notebook-extension', 'extensions/search-result', 'extensions/simple-browser', 'extensions/tunnel-forwarding', -Index: third-party-src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +Index: code-editor-src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts =================================================================== ---- third-party-src.orig/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts -+++ third-party-src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts -@@ -262,7 +262,12 @@ Registry.as(Conf - type: 'boolean', +--- code-editor-src.orig/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts ++++ code-editor-src/src/vs/workbench/contrib/extensions/browser/extensions.contribution.ts +@@ -263,6 +263,11 @@ Registry.as(Conf description: localize('extensionsInQuickAccess', "When enabled, extensions can be searched for via Quick Access and report issues from there."), default: true -- }, -+ }, + }, + 'extensions.openNotebookData': { + type: 'object', + scope: ConfigurationScope.APPLICATION, @@ -40,10 +38,10 @@ Index: third-party-src/src/vs/workbench/contrib/extensions/browser/extensions.co [VerifyExtensionSignatureConfigKey]: { type: 'boolean', description: localize('extensions.verifySignature', "When enabled, extensions are verified to be signed before getting installed."), -Index: third-party-src/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +Index: code-editor-src/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts =================================================================== ---- third-party-src.orig/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts -+++ third-party-src/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts +--- code-editor-src.orig/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts ++++ code-editor-src/src/vs/workbench/contrib/extensions/browser/extensionsWorkbenchService.ts @@ -1084,6 +1084,17 @@ export class ExtensionsWorkbenchService urlService.registerHandler(this); @@ -62,10 +60,10 @@ Index: third-party-src/src/vs/workbench/contrib/extensions/browser/extensionsWor } private async initialize(): Promise { -Index: third-party-src/extensions/sagemaker-open-notebook-extension/extension-browser.webpack.config.js +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/extension-browser.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/extension-browser.webpack.config.js ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/extension-browser.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -84,10 +82,10 @@ Index: third-party-src/extensions/sagemaker-open-notebook-extension/extension-br + extension: './src/extension.ts' + }, +}); -Index: third-party-src/extensions/sagemaker-open-notebook-extension/extension.webpack.config.js +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/extension.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/extension.webpack.config.js ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/extension.webpack.config.js @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -109,10 +107,10 @@ Index: third-party-src/extensions/sagemaker-open-notebook-extension/extension.we + extension: './src/extension.ts', + } +}); -Index: third-party-src/extensions/sagemaker-open-notebook-extension/package.json +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/package.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/package.json ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/package.json @@ -0,0 +1,44 @@ +{ + "name": "sagemaker-open-notebook-extension", @@ -158,10 +156,10 @@ Index: third-party-src/extensions/sagemaker-open-notebook-extension/package.json + "dependencies": {}, + "repository": {} +} -Index: third-party-src/extensions/sagemaker-open-notebook-extension/src/extension.ts +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/src/extension.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/src/extension.ts ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/src/extension.ts @@ -0,0 +1,100 @@ + +import * as vscode from 'vscode'; @@ -263,10 +261,10 @@ Index: third-party-src/extensions/sagemaker-open-notebook-extension/src/extensio + }); +} +export function deactivate() {} -Index: third-party-src/extensions/sagemaker-open-notebook-extension/tsconfig.json +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/tsconfig.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/tsconfig.json ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.base.json", @@ -278,10 +276,10 @@ Index: third-party-src/extensions/sagemaker-open-notebook-extension/tsconfig.jso + "../../src/vscode-dts/vscode.d.ts" + ] +} -Index: third-party-src/extensions/sagemaker-open-notebook-extension/.vscodeignore +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/.vscodeignore =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/.vscodeignore ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/.vscodeignore @@ -0,0 +1,11 @@ +.vscode/** +.vscode-test/** @@ -294,10 +292,10 @@ Index: third-party-src/extensions/sagemaker-open-notebook-extension/.vscodeignor +out/** +cgmanifest.json +preview-src/** -Index: third-party-src/extensions/sagemaker-open-notebook-extension/README.md +Index: code-editor-src/extensions/sagemaker-open-notebook-extension/README.md =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-open-notebook-extension/README.md ++++ code-editor-src/extensions/sagemaker-open-notebook-extension/README.md @@ -0,0 +1,18 @@ +# Code Editor Open Notebook Extension + diff --git a/patches/sagemaker/sagemaker-ui-dark-theme.diff b/patches/sagemaker/sagemaker-ui-dark-theme.diff index 58c4f50..4ab2f57 100644 --- a/patches/sagemaker/sagemaker-ui-dark-theme.diff +++ b/patches/sagemaker/sagemaker-ui-dark-theme.diff @@ -1,7 +1,7 @@ -Index: third-party-src/extensions/sagemaker-ui-dark-theme/.vscodeignore +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/.vscodeignore =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/.vscodeignore ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/.vscodeignore @@ -0,0 +1,11 @@ +.vscode/** +.vscode-test/** @@ -14,16 +14,16 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/.vscodeignore +out/** +cgmanifest.json +preview-src/** -Index: third-party-src/extensions/sagemaker-ui-dark-theme/README.md +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/README.md =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/README.md ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/README.md @@ -0,0 +1 @@ +# SageMaker UI Dark Theme -Index: third-party-src/extensions/sagemaker-ui-dark-theme/extension-browser.webpack.config.js +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/extension-browser.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/extension-browser.webpack.config.js ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/extension-browser.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -42,10 +42,10 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/extension-browser.webp + extension: './src/extension.ts' + }, +}); -Index: third-party-src/extensions/sagemaker-ui-dark-theme/extension.webpack.config.js +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/extension.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/extension.webpack.config.js ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/extension.webpack.config.js @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -67,10 +67,10 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/extension.webpack.conf + extension: './src/extension.ts', + } +}); -Index: third-party-src/extensions/sagemaker-ui-dark-theme/src/extension.ts +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/src/extension.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/src/extension.ts ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/src/extension.ts @@ -0,0 +1,51 @@ +import * as vscode from 'vscode'; + @@ -123,10 +123,10 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/src/extension.ts + outputChannel.dispose(); + } +} -Index: third-party-src/extensions/sagemaker-ui-dark-theme/tsconfig.json +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/tsconfig.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/tsconfig.json ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.base.json", @@ -138,11 +138,11 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/tsconfig.json + "../../src/vscode-dts/vscode.d.ts" + ] +} -Index: third-party-src/build/gulpfile.extensions.js +Index: code-editor-src/build/gulpfile.extensions.js =================================================================== ---- third-party-src.orig/build/gulpfile.extensions.js -+++ third-party-src/build/gulpfile.extensions.js -@@ -63,6 +63,7 @@ const compilations = [ +--- code-editor-src.orig/build/gulpfile.extensions.js ++++ code-editor-src/build/gulpfile.extensions.js +@@ -64,6 +64,7 @@ const compilations = [ 'extensions/sagemaker-idle-extension/tsconfig.json', 'extensions/sagemaker-terminal-crash-mitigation/tsconfig.json', 'extensions/sagemaker-open-notebook-extension/tsconfig.json', @@ -150,11 +150,11 @@ Index: third-party-src/build/gulpfile.extensions.js 'extensions/tunnel-forwarding/tsconfig.json', 'extensions/typescript-language-features/test-workspace/tsconfig.json', 'extensions/typescript-language-features/web/tsconfig.json', -Index: third-party-src/build/npm/dirs.js +Index: code-editor-src/build/npm/dirs.js =================================================================== ---- third-party-src.orig/build/npm/dirs.js -+++ third-party-src/build/npm/dirs.js -@@ -41,6 +41,7 @@ const dirs = [ +--- code-editor-src.orig/build/npm/dirs.js ++++ code-editor-src/build/npm/dirs.js +@@ -42,6 +42,7 @@ const dirs = [ 'extensions/sagemaker-idle-extension', 'extensions/sagemaker-terminal-crash-mitigation', 'extensions/sagemaker-open-notebook-extension', @@ -162,10 +162,10 @@ Index: third-party-src/build/npm/dirs.js 'extensions/search-result', 'extensions/simple-browser', 'extensions/tunnel-forwarding', -Index: third-party-src/extensions/sagemaker-ui-dark-theme/package.json +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/package.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/package.json ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/package.json @@ -0,0 +1,46 @@ +{ + "name": "sagemaker-ui-dark-theme", @@ -213,10 +213,10 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/package.json + "repository": { + } +} -Index: third-party-src/.vscode-test.js +Index: code-editor-src/.vscode-test.js =================================================================== ---- third-party-src.orig/.vscode-test.js -+++ third-party-src/.vscode-test.js +--- code-editor-src.orig/.vscode-test.js ++++ code-editor-src/.vscode-test.js @@ -63,6 +63,11 @@ const extensions = [ mocha: { timeout: 60_000 } }, @@ -229,11 +229,10 @@ Index: third-party-src/.vscode-test.js label: 'microsoft-authentication', mocha: { timeout: 60_000 } }, - -Index: third-party-src/extensions/sagemaker-ui-dark-theme/src/test/extension.test.ts +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/src/test/extension.test.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/src/test/extension.test.ts ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/src/test/extension.test.ts @@ -0,0 +1,123 @@ +import * as assert from 'assert'; +import * as vscode from 'vscode'; @@ -358,10 +357,10 @@ Index: third-party-src/extensions/sagemaker-ui-dark-theme/src/test/extension.tes + assert.strictEqual(theme?.globalValue, undefined, 'Global theme should not be set'); + }); +}); -Index: third-party-src/extensions/sagemaker-ui-dark-theme/src/test/index.ts +Index: code-editor-src/extensions/sagemaker-ui-dark-theme/src/test/index.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-ui-dark-theme/src/test/index.ts ++++ code-editor-src/extensions/sagemaker-ui-dark-theme/src/test/index.ts @@ -0,0 +1,33 @@ +import * as path from 'path'; +import * as testRunner from '../../../../test/integration/electron/testrunner'; diff --git a/patches/sagemaker/sagemaker-ui-post-startup.diff b/patches/sagemaker/sagemaker-ui-post-startup.diff index 3e22397..1159c11 100644 --- a/patches/sagemaker/sagemaker-ui-post-startup.diff +++ b/patches/sagemaker/sagemaker-ui-post-startup.diff @@ -1,17 +1,8 @@ -Index: third-party-src/src/vs/server/node/webClientServer.ts +Index: code-editor-src/src/vs/server/node/webClientServer.ts =================================================================== ---- third-party-src.orig/src/vs/server/node/webClientServer.ts -+++ third-party-src/src/vs/server/node/webClientServer.ts -@@ -5,6 +5,8 @@ - - import { createReadStream, promises, existsSync, writeFileSync } from 'fs'; - import * as http from 'http'; -+import { spawn } from 'child_process'; -+import * as fs from 'fs'; - import * as url from 'url'; - import * as cookie from 'cookie'; - import * as crypto from 'crypto'; -@@ -38,6 +40,10 @@ const textMimeType: { [ext: string]: str +--- code-editor-src.orig/src/vs/server/node/webClientServer.ts ++++ code-editor-src/src/vs/server/node/webClientServer.ts +@@ -39,6 +39,10 @@ const textMimeType: { [ext: string]: str '.svg': 'image/svg+xml', }; @@ -22,15 +13,15 @@ Index: third-party-src/src/vs/server/node/webClientServer.ts /** * Return an error to the client. */ -@@ -97,6 +103,7 @@ const STATIC_PATH = `/static`; +@@ -99,6 +103,7 @@ const STATIC_PATH = `/static`; const CALLBACK_PATH = `/callback`; const WEB_EXTENSION_PATH = `/web-extension-resource`; const IDLE_EXTENSION_PATH = `/api/idle`; +const POST_STARTUP_SCRIPT_PATH = `/api/poststartup`; - export class WebClientServer { - -@@ -137,6 +144,9 @@ export class WebClientServer { + /** + * Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files. +@@ -171,6 +176,9 @@ export class WebClientServer { if (pathname === IDLE_EXTENSION_PATH) { return this._handleIdle(req, res); } @@ -40,7 +31,7 @@ Index: third-party-src/src/vs/server/node/webClientServer.ts if (pathname.startsWith(WEB_EXTENSION_PATH) && pathname.charCodeAt(WEB_EXTENSION_PATH.length) === CharCode.Slash) { // extension resource support return this._handleWebExtensionResource(req, res, pathname.substring(WEB_EXTENSION_PATH.length)); -@@ -534,6 +544,41 @@ export class WebClientServer { +@@ -570,6 +578,41 @@ export class WebClientServer { serveError(req, res, 500, error.message) } } @@ -80,3 +71,5 @@ Index: third-party-src/src/vs/server/node/webClientServer.ts + } + } } + + diff --git a/patches/sagemaker/terminal-crash-mitigation.diff b/patches/sagemaker/terminal-crash-mitigation.diff index a936399..6ab4fed 100644 --- a/patches/sagemaker/terminal-crash-mitigation.diff +++ b/patches/sagemaker/terminal-crash-mitigation.diff @@ -1,7 +1,7 @@ -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/.vscodeignore +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/.vscodeignore =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/.vscodeignore ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/.vscodeignore @@ -0,0 +1,11 @@ +.vscode/** +.vscode-test/** @@ -14,10 +14,10 @@ Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/.vscodeign +out/** +cgmanifest.json +preview-src/** -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/extension-browser.webpack.config.js +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/extension-browser.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/extension-browser.webpack.config.js ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/extension-browser.webpack.config.js @@ -0,0 +1,17 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -36,10 +36,10 @@ Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/extension- + extension: './src/extension.ts' + }, +}); -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/extension.webpack.config.js +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/extension.webpack.config.js =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/extension.webpack.config.js ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/extension.webpack.config.js @@ -0,0 +1,20 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright Amazon.com Inc. or its affiliates. All rights reserved. @@ -61,18 +61,18 @@ Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/extension. + extension: './src/extension.ts', + } +}); -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/README.md +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/README.md =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/README.md ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/README.md @@ -0,0 +1,2 @@ +# Terminal Crash Mitigation +This extension addresses a critical issue where terminals fail to open. As of August 9, 2024, the root cause remains unidentified. The extension works by monitoring the creation of new terminals and detects if a terminal closes within 1 second of being opened. When this condition is met, it assumes the issue has occurred and attempts to mitigate it by terminating any background terminal processes. However, it will not terminate any terminal processes if there is an active terminal in the UI. \ No newline at end of file -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/package.json +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/package.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/package.json ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/package.json @@ -0,0 +1,43 @@ +{ + "name": "sagemaker-terminal-crash-mitigation", @@ -117,10 +117,10 @@ Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/package.js + "dependencies": {}, + "repository": {} +} -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/src/extension.ts +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/src/extension.ts =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/src/extension.ts ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/src/extension.ts @@ -0,0 +1,103 @@ +import * as vscode from 'vscode'; +import { exec } from 'child_process'; @@ -225,10 +225,10 @@ Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/src/extens +} + +export function deactivate() {} -Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.json +Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.json =================================================================== --- /dev/null -+++ third-party-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.json ++++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.json @@ -0,0 +1,10 @@ +{ + "extends": "../tsconfig.base.json", @@ -240,10 +240,10 @@ Index: third-party-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.j + "../../src/vscode-dts/vscode.d.ts" + ] +} -Index: third-party-src/build/gulpfile.extensions.js +Index: code-editor-src/build/gulpfile.extensions.js =================================================================== ---- third-party-src.orig/build/gulpfile.extensions.js -+++ third-party-src/build/gulpfile.extensions.js +--- code-editor-src.orig/build/gulpfile.extensions.js ++++ code-editor-src/build/gulpfile.extensions.js @@ -62,6 +62,7 @@ const compilations = [ 'extensions/simple-browser/tsconfig.json', 'extensions/sagemaker-extension/tsconfig.json', @@ -252,10 +252,10 @@ Index: third-party-src/build/gulpfile.extensions.js 'extensions/tunnel-forwarding/tsconfig.json', 'extensions/typescript-language-features/test-workspace/tsconfig.json', 'extensions/typescript-language-features/web/tsconfig.json', -Index: third-party-src/build/npm/dirs.js +Index: code-editor-src/build/npm/dirs.js =================================================================== ---- third-party-src.orig/build/npm/dirs.js -+++ third-party-src/build/npm/dirs.js +--- code-editor-src.orig/build/npm/dirs.js ++++ code-editor-src/build/npm/dirs.js @@ -40,6 +40,7 @@ const dirs = [ 'extensions/references-view', 'extensions/sagemaker-extension', From 59216c67c90a888e55b154fa5c4130429e61baff Mon Sep 17 00:00:00 2001 From: Newton Der Date: Fri, 5 Dec 2025 13:13:19 -0800 Subject: [PATCH 4/5] Fix import of fs --- patches/sagemaker/sagemaker-idle-extension.diff | 17 +++++++++-------- .../sagemaker/sagemaker-ui-post-startup.diff | 8 ++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/patches/sagemaker/sagemaker-idle-extension.diff b/patches/sagemaker/sagemaker-idle-extension.diff index 68f0bf3..05560d9 100644 --- a/patches/sagemaker/sagemaker-idle-extension.diff +++ b/patches/sagemaker/sagemaker-idle-extension.diff @@ -225,18 +225,19 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts =================================================================== --- code-editor-src.orig/src/vs/server/node/webClientServer.ts +++ code-editor-src/src/vs/server/node/webClientServer.ts -@@ -3,8 +3,9 @@ +@@ -3,8 +3,10 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { createReadStream, promises } from 'fs'; -+import { createReadStream, promises, existsSync, readdirSync, statSync, writeFileSync } from 'fs'; ++import { createReadStream, promises, existsSync, writeFileSync } from 'fs'; ++import * as fs from 'fs'; import * as http from 'http'; +import * as path from 'path'; import * as url from 'url'; import * as cookie from 'cookie'; import * as crypto from 'crypto'; -@@ -91,11 +92,45 @@ export async function serveFile(filePath +@@ -91,11 +93,45 @@ export async function serveFile(filePath } } @@ -262,18 +263,18 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts + */ +function checkTerminalActivity(idleFilePath: string) { + try { -+ const files: string[] = readdirSync('/dev/pts'); ++ const files: string[] = fs.readdirSync('/dev/pts'); + const now = new Date(); + + const activityDetected = files.some((file: string) => { + const filePath = path.join('/dev/pts', file); -+ const stats = statSync(filePath); ++ const stats = fs.statSync(filePath); + const mtime = new Date(stats.mtime).getTime(); + return now.getTime() - mtime < CHECK_INTERVAL; + }); + + if (activityDetected) { -+ writeFileSync(idleFilePath, now.toISOString()); ++ fs.writeFileSync(idleFilePath, now.toISOString()); + } + } catch (err) { + console.error('Error checking terminal activity:', err); @@ -282,7 +283,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts export class WebClientServer { -@@ -133,6 +168,9 @@ export class WebClientServer { +@@ -133,6 +169,9 @@ export class WebClientServer { // callback support return this._handleCallback(res); } @@ -292,7 +293,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts if (pathname.startsWith(WEB_EXTENSION_PATH) && pathname.charCodeAt(WEB_EXTENSION_PATH.length) === CharCode.Slash) { // extension resource support return this._handleWebExtensionResource(req, res, pathname.substring(WEB_EXTENSION_PATH.length)); -@@ -505,6 +543,33 @@ export class WebClientServer { +@@ -505,6 +544,33 @@ export class WebClientServer { }); return void res.end(data); } diff --git a/patches/sagemaker/sagemaker-ui-post-startup.diff b/patches/sagemaker/sagemaker-ui-post-startup.diff index 1159c11..604b055 100644 --- a/patches/sagemaker/sagemaker-ui-post-startup.diff +++ b/patches/sagemaker/sagemaker-ui-post-startup.diff @@ -2,7 +2,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts =================================================================== --- code-editor-src.orig/src/vs/server/node/webClientServer.ts +++ code-editor-src/src/vs/server/node/webClientServer.ts -@@ -39,6 +39,10 @@ const textMimeType: { [ext: string]: str +@@ -40,6 +40,10 @@ const textMimeType: { [ext: string]: str '.svg': 'image/svg+xml', }; @@ -13,7 +13,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts /** * Return an error to the client. */ -@@ -99,6 +103,7 @@ const STATIC_PATH = `/static`; +@@ -100,6 +104,7 @@ const STATIC_PATH = `/static`; const CALLBACK_PATH = `/callback`; const WEB_EXTENSION_PATH = `/web-extension-resource`; const IDLE_EXTENSION_PATH = `/api/idle`; @@ -21,7 +21,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts /** * Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files. -@@ -171,6 +176,9 @@ export class WebClientServer { +@@ -172,6 +177,9 @@ export class WebClientServer { if (pathname === IDLE_EXTENSION_PATH) { return this._handleIdle(req, res); } @@ -31,7 +31,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts if (pathname.startsWith(WEB_EXTENSION_PATH) && pathname.charCodeAt(WEB_EXTENSION_PATH.length) === CharCode.Slash) { // extension resource support return this._handleWebExtensionResource(req, res, pathname.substring(WEB_EXTENSION_PATH.length)); -@@ -570,6 +578,41 @@ export class WebClientServer { +@@ -571,6 +579,41 @@ export class WebClientServer { serveError(req, res, 500, error.message) } } From d355c9e8825b71a7aac9b48ea28c7e74325f03d0 Mon Sep 17 00:00:00 2001 From: Newton Der Date: Mon, 8 Dec 2025 09:43:20 -0800 Subject: [PATCH 5/5] Add spawn import --- patches/sagemaker/sagemaker-ui-post-startup.diff | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/patches/sagemaker/sagemaker-ui-post-startup.diff b/patches/sagemaker/sagemaker-ui-post-startup.diff index 604b055..ed06db9 100644 --- a/patches/sagemaker/sagemaker-ui-post-startup.diff +++ b/patches/sagemaker/sagemaker-ui-post-startup.diff @@ -2,7 +2,15 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts =================================================================== --- code-editor-src.orig/src/vs/server/node/webClientServer.ts +++ code-editor-src/src/vs/server/node/webClientServer.ts -@@ -40,6 +40,10 @@ const textMimeType: { [ext: string]: str +@@ -10,6 +10,7 @@ import * as path from 'path'; + import * as url from 'url'; + import * as cookie from 'cookie'; + import * as crypto from 'crypto'; ++import { spawn } from 'child_process'; + import { isEqualOrParent } from '../../base/common/extpath.js'; + import { getMediaMime } from '../../base/common/mime.js'; + import { isLinux } from '../../base/common/platform.js'; +@@ -40,6 +41,10 @@ const textMimeType: { [ext: string]: str '.svg': 'image/svg+xml', }; @@ -13,7 +21,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts /** * Return an error to the client. */ -@@ -100,6 +104,7 @@ const STATIC_PATH = `/static`; +@@ -100,6 +105,7 @@ const STATIC_PATH = `/static`; const CALLBACK_PATH = `/callback`; const WEB_EXTENSION_PATH = `/web-extension-resource`; const IDLE_EXTENSION_PATH = `/api/idle`; @@ -21,7 +29,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts /** * Checks for terminal activity by reading the /dev/pts directory and comparing modification times of the files. -@@ -172,6 +177,9 @@ export class WebClientServer { +@@ -172,6 +178,9 @@ export class WebClientServer { if (pathname === IDLE_EXTENSION_PATH) { return this._handleIdle(req, res); } @@ -31,7 +39,7 @@ Index: code-editor-src/src/vs/server/node/webClientServer.ts if (pathname.startsWith(WEB_EXTENSION_PATH) && pathname.charCodeAt(WEB_EXTENSION_PATH.length) === CharCode.Slash) { // extension resource support return this._handleWebExtensionResource(req, res, pathname.substring(WEB_EXTENSION_PATH.length)); -@@ -571,6 +579,41 @@ export class WebClientServer { +@@ -571,6 +580,41 @@ export class WebClientServer { serveError(req, res, 500, error.message) } }