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
43 changes: 43 additions & 0 deletions patches/common/guard-default-account-config.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
Guard toDefaultAccountConfig against missing provider fields

Code Editor replaces the upstream GitHub Copilot defaultChatAgent with a
minimal Amazon Q configuration that omits provider, providerScopes, and
other fields unused by Code Editor. Add optional chaining so the default
account service initializes safely with missing fields instead of
crashing at startup.

Index: code-editor-src/src/vs/workbench/services/accounts/browser/defaultAccount.ts
===================================================================
--- code-editor-src.orig/src/vs/workbench/services/accounts/browser/defaultAccount.ts
+++ code-editor-src/src/vs/workbench/services/accounts/browser/defaultAccount.ts
@@ -93,20 +93,20 @@ function toDefaultAccountConfig(defaultC
],
authenticationProvider: {
default: {
- id: defaultChatAgent.provider.default.id,
- name: defaultChatAgent.provider.default.name,
+ id: defaultChatAgent.provider?.default?.id ?? '',
+ name: defaultChatAgent.provider?.default?.name ?? '',
},
enterprise: {
- id: defaultChatAgent.provider.enterprise.id,
- name: defaultChatAgent.provider.enterprise.name,
+ id: defaultChatAgent.provider?.enterprise?.id ?? '',
+ name: defaultChatAgent.provider?.enterprise?.name ?? '',
},
- enterpriseProviderConfig: `${defaultChatAgent.completionsAdvancedSetting}.authProvider`,
- enterpriseProviderUriSetting: defaultChatAgent.providerUriSetting,
- scopes: defaultChatAgent.providerScopes,
+ enterpriseProviderConfig: `${defaultChatAgent.completionsAdvancedSetting ?? ''}.authProvider`,
+ enterpriseProviderUriSetting: defaultChatAgent.providerUriSetting ?? '',
+ scopes: defaultChatAgent.providerScopes ?? [],
},
- entitlementUrl: defaultChatAgent.entitlementUrl,
- tokenEntitlementUrl: defaultChatAgent.tokenEntitlementUrl,
- mcpRegistryDataUrl: defaultChatAgent.mcpRegistryDataUrl,
+ entitlementUrl: defaultChatAgent.entitlementUrl ?? '',
+ tokenEntitlementUrl: defaultChatAgent.tokenEntitlementUrl ?? '',
+ mcpRegistryDataUrl: defaultChatAgent.mcpRegistryDataUrl ?? '',
};
}

313 changes: 260 additions & 53 deletions patches/common/remove-builtin-extensions.diff

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions patches/sagemaker.series
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ common/integration.diff
common/fix-ts-rootdir-webpack.diff
common/finding-overrides.diff
common/fix-chat-debug-editor-visibility.diff
common/guard-default-account-config.diff
web-server/suppress-known-errors-build-integration.diff
web-server/local-storage.diff
web-server/base-path.diff
Expand Down
47 changes: 28 additions & 19 deletions patches/sagemaker/post-startup-notifications.diff
Original file line number Diff line number Diff line change
Expand Up @@ -303,9 +303,9 @@ Index: code-editor-src/extensions/post-startup-notifications/src/extension.ts
+ }
+ });
+
+ watcher.on('add', (path) => {
+ watcher.on('add', (_path) => {
+ processStatusFile();
+ }).on('change', (path) => {
+ }).on('change', (_path) => {
+ processStatusFile();
+ }).on('unlink', (path) => {
+ outputChannel.appendLine(`File ${path} has been removed`);
Expand Down Expand Up @@ -665,25 +665,34 @@ Index: code-editor-src/extensions/post-startup-notifications/tsconfig.json
===================================================================
--- /dev/null
+++ code-editor-src/extensions/post-startup-notifications/tsconfig.json
@@ -0,0 +1,17 @@
@@ -0,0 +1,27 @@
+{
+ "compilerOptions": {
+ "module": "Node16",
+ "target": "ES2022",
+ "lib": [
+ "ES2022"
+ ],
+ "sourceMap": true,
+ "rootDir": "src",
+ "strict": true, /* enable all strict type-checking options */
+ "isolatedModules": true
+ /* Additional Checks */
+ // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
+ }
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "module": "Node16",
+ "target": "ES2022",
+ "lib": [
+ "ES2022"
+ ],
+ "sourceMap": true,
+ "rootDir": "src",
+ "outDir": "./out",
+ "strict": true,
+ "isolatedModules": true,
+ "typeRoots": [
+ "./node_modules/@types"
+ ],
+ "skipLibCheck": true
+ },
+ "exclude": [
+ "node_modules",
+ ".vscode-test"
+ ],
+ "include": [
+ "src/**/*",
+ "../../src/vscode-dts/vscode.d.ts"
+ ]
+}
\ No newline at end of file
Index: code-editor-src/extensions/post-startup-notifications/webpack.config.js
===================================================================
--- /dev/null
Expand Down
5 changes: 3 additions & 2 deletions patches/sagemaker/sagemaker-extension.diff
Original file line number Diff line number Diff line change
Expand Up @@ -319,11 +319,12 @@ Index: code-editor-src/extensions/sagemaker-extension/tsconfig.json
===================================================================
--- /dev/null
+++ code-editor-src/extensions/sagemaker-extension/tsconfig.json
@@ -0,0 +1,10 @@
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./out"
+ "outDir": "./out",
+ "skipLibCheck": true
+ },
+ "include": [
+ "src/**/*",
Expand Down
5 changes: 3 additions & 2 deletions patches/sagemaker/sagemaker-extensions-sync.diff
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,12 @@ Index: code-editor-src/extensions/sagemaker-extensions-sync/tsconfig.json
===================================================================
--- /dev/null
+++ code-editor-src/extensions/sagemaker-extensions-sync/tsconfig.json
@@ -0,0 +1,10 @@
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./out"
+ "outDir": "./out",
+ "skipLibCheck": true
+ },
+ "include": [
+ "../sagemaker-extensions-sync/src/**/*",
Expand Down
5 changes: 3 additions & 2 deletions patches/sagemaker/sagemaker-idle-extension.diff
Original file line number Diff line number Diff line change
Expand Up @@ -104,11 +104,12 @@ Index: code-editor-src/extensions/sagemaker-idle-extension/tsconfig.json
===================================================================
--- /dev/null
+++ code-editor-src/extensions/sagemaker-idle-extension/tsconfig.json
@@ -0,0 +1,10 @@
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./out"
+ "outDir": "./out",
+ "skipLibCheck": true
+ },
+ "include": [
+ "../sagemaker-idle-extension/src/**/*",
Expand Down
5 changes: 3 additions & 2 deletions patches/sagemaker/sagemaker-open-notebook-extension.diff
Original file line number Diff line number Diff line change
Expand Up @@ -239,11 +239,12 @@ Index: code-editor-src/extensions/sagemaker-open-notebook-extension/tsconfig.jso
===================================================================
--- /dev/null
+++ code-editor-src/extensions/sagemaker-open-notebook-extension/tsconfig.json
@@ -0,0 +1,10 @@
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./out"
+ "outDir": "./out",
+ "skipLibCheck": true
+ },
+ "include": [
+ "../sagemaker-open-notebook-extension/src/**/*",
Expand Down
5 changes: 3 additions & 2 deletions patches/sagemaker/sagemaker-ui-dark-theme.diff
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,12 @@ Index: code-editor-src/extensions/sagemaker-ui-dark-theme/tsconfig.json
===================================================================
--- /dev/null
+++ code-editor-src/extensions/sagemaker-ui-dark-theme/tsconfig.json
@@ -0,0 +1,10 @@
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./out"
+ "outDir": "./out",
+ "skipLibCheck": true
+ },
+ "include": [
+ "src/**/*",
Expand Down
5 changes: 3 additions & 2 deletions patches/sagemaker/terminal-crash-mitigation.diff
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,12 @@ Index: code-editor-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.j
===================================================================
--- /dev/null
+++ code-editor-src/extensions/sagemaker-terminal-crash-mitigation/tsconfig.json
@@ -0,0 +1,10 @@
@@ -0,0 +1,11 @@
+{
+ "extends": "../tsconfig.base.json",
+ "compilerOptions": {
+ "outDir": "./out"
+ "outDir": "./out",
+ "skipLibCheck": true
+ },
+ "include": [
+ "../sagemaker-terminal-crash-mitigation/src/**/*",
Expand Down
1 change: 1 addition & 0 deletions patches/web-embedded-with-terminal.series
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ common/integration.diff
common/fix-ts-rootdir-webpack.diff
common/finding-overrides.diff
common/fix-chat-debug-editor-visibility.diff
common/guard-default-account-config.diff
web-embedded/readd-workbench.diff
web-embedded/suppress-known-errors-build-integration.diff
web-embedded/disable-built-in-walkthroughs-from-c.diff
Expand Down
1 change: 1 addition & 0 deletions patches/web-embedded.series
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ common/integration.diff
common/fix-ts-rootdir-webpack.diff
common/finding-overrides.diff
common/fix-chat-debug-editor-visibility.diff
common/guard-default-account-config.diff
web-embedded/readd-workbench.diff
web-embedded/suppress-known-errors-build-integration.diff
web-embedded/disable-built-in-walkthroughs-from-c.diff
Expand Down
1 change: 1 addition & 0 deletions patches/web-server.series
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ common/integration.diff
common/fix-ts-rootdir-webpack.diff
common/finding-overrides.diff
common/fix-chat-debug-editor-visibility.diff
common/guard-default-account-config.diff
web-server/suppress-known-errors-build-integration.diff
web-server/local-storage.diff
web-server/base-path.diff
Expand Down