From f4c380082bed886391559cbe650ada85e2a568ea Mon Sep 17 00:00:00 2001 From: "Sparsh :)" <76697238+SparshGarg999@users.noreply.github.com> Date: Mon, 6 Jul 2026 14:05:56 +0530 Subject: [PATCH 1/2] Add optional chaining guards to theme colors to prevent activation crash --- extensions/vscode/src/activation/InlineTipManager.ts | 6 +++--- extensions/vscode/src/activation/JumpManager.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/extensions/vscode/src/activation/InlineTipManager.ts b/extensions/vscode/src/activation/InlineTipManager.ts index 5e88c5ad16d..5ee6697a598 100644 --- a/extensions/vscode/src/activation/InlineTipManager.ts +++ b/extensions/vscode/src/activation/InlineTipManager.ts @@ -236,7 +236,7 @@ export class InlineTipManager { private createSvgTooltipDecoration() { var backgroundColour = "#333333"; - if (this.theme) { + if (this.theme?.colors?.["editor.background"]) { backgroundColour = this.theme.colors["editor.background"]; } return vscode.window.createTextEditorDecorationType({ @@ -274,7 +274,7 @@ export class InlineTipManager { { ...baseTextConfig, x: SVG_CONFIG.chatLabelX, - fill: this.theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.chatLabel, ) @@ -291,7 +291,7 @@ export class InlineTipManager { { ...baseTextConfig, x: SVG_CONFIG.editLabelX, - fill: this.theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.editLabel, ) diff --git a/extensions/vscode/src/activation/JumpManager.ts b/extensions/vscode/src/activation/JumpManager.ts index 43c4ed8fdff..556804eb166 100644 --- a/extensions/vscode/src/activation/JumpManager.ts +++ b/extensions/vscode/src/activation/JumpManager.ts @@ -145,7 +145,7 @@ export class JumpManager { { ...baseTextConfig, x: 4, - fill: this._theme?.colors["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: this._theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.label, ) @@ -168,7 +168,7 @@ export class JumpManager { private _createSvgJumpDecoration(): vscode.TextEditorDecorationType { const backgroundColour = - this._theme?.colors["editor.background"] ?? "#333333"; + this._theme?.colors?.["editor.background"] ?? "#333333"; return vscode.window.createTextEditorDecorationType({ after: { From 8036aff833439f444f444357a5cbb2647f64dc16 Mon Sep 17 00:00:00 2001 From: "Sparsh :)" <76697238+SparshGarg999@users.noreply.github.com> Date: Mon, 6 Jul 2026 20:59:59 +0530 Subject: [PATCH 2/2] Format theme color guard files with prettier --- extensions/vscode/src/activation/InlineTipManager.ts | 6 ++++-- extensions/vscode/src/activation/JumpManager.ts | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/extensions/vscode/src/activation/InlineTipManager.ts b/extensions/vscode/src/activation/InlineTipManager.ts index 5ee6697a598..9ae35c6e8cd 100644 --- a/extensions/vscode/src/activation/InlineTipManager.ts +++ b/extensions/vscode/src/activation/InlineTipManager.ts @@ -274,7 +274,8 @@ export class InlineTipManager { { ...baseTextConfig, x: SVG_CONFIG.chatLabelX, - fill: this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: + this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.chatLabel, ) @@ -291,7 +292,8 @@ export class InlineTipManager { { ...baseTextConfig, x: SVG_CONFIG.editLabelX, - fill: this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: + this.theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.editLabel, ) diff --git a/extensions/vscode/src/activation/JumpManager.ts b/extensions/vscode/src/activation/JumpManager.ts index 556804eb166..0dd7f4066c6 100644 --- a/extensions/vscode/src/activation/JumpManager.ts +++ b/extensions/vscode/src/activation/JumpManager.ts @@ -145,7 +145,8 @@ export class JumpManager { { ...baseTextConfig, x: 4, - fill: this._theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, + fill: + this._theme?.colors?.["editor.foreground"] ?? SVG_CONFIG.stroke, }, SVG_CONFIG.label, )