From 3d8bcf52419a1959dcc9f9d4f3ceaeac08d5c110 Mon Sep 17 00:00:00 2001 From: andrepimenta Date: Sun, 19 Apr 2026 21:21:11 +0100 Subject: [PATCH] Hide OpenCredits option when feature flag is disabled and bump to 2.0.5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only show "Just try it · Pay as you go with OpenCredits" in the install modal when the OpenCredits feature flag is enabled for the user's region. Co-Authored-By: Claude Opus 4.6 (1M context) --- build/open-vsix/build.sh | 2 +- package.json | 2 +- src/script.ts | 8 ++++++++ src/ui.ts | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/build/open-vsix/build.sh b/build/open-vsix/build.sh index 249af03..fef8675 100755 --- a/build/open-vsix/build.sh +++ b/build/open-vsix/build.sh @@ -6,7 +6,7 @@ set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" -VERSION="2.0.4" +VERSION="2.0.5" OUTPUT_NAME="vsix-claude-code-chat-${VERSION}.vsix" echo "Building Open VSIX version ${VERSION}..." diff --git a/package.json b/package.json index 434eba7..638cb28 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "claude-code-chat", "displayName": "Chat for Claude Code", "description": "Beautiful Claude Code Chat Interface for VS Code", - "version": "2.0.4", + "version": "2.0.5", "publisher": "AndrePimenta", "author": "Andre Pimenta", "repository": { diff --git a/src/script.ts b/src/script.ts index d51fad2..d91425b 100644 --- a/src/script.ts +++ b/src/script.ts @@ -2839,6 +2839,10 @@ const getScript = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'htt if (checkout) checkout.style.display = 'none'; if (funds) funds.style.display = 'none'; + // Hide OpenCredits option if feature flag is disabled + var ocOption = document.getElementById('installOpenCreditsOption'); + if (ocOption) ocOption.style.display = opencreditsEnabled ? '' : 'none'; + sendStats('Login options shown'); } @@ -2872,6 +2876,10 @@ const getScript = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'htt const successEl = document.getElementById('installSuccess'); successEl.style.display = 'flex'; + // Hide OpenCredits option if feature flag is disabled + const ocOption = document.getElementById('installOpenCreditsOption'); + if (ocOption) ocOption.style.display = opencreditsEnabled ? '' : 'none'; + if (success) { sendStats('Install success'); successEl.querySelector('.install-success-text').textContent = 'Installed'; diff --git a/src/ui.ts b/src/ui.ts index 68ae0c7..8e9525d 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -608,7 +608,7 @@ const getHtml = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'https I have a plan Login with Anthropic · Pro, Max, or API key -