Hide OpenCredits option when feature flag is disabled and bump to 2.0.5

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) <noreply@anthropic.com>
This commit is contained in:
andrepimenta
2026-04-19 21:21:11 +01:00
parent 474910a330
commit 3d8bcf5241
4 changed files with 11 additions and 3 deletions

View File

@@ -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}..."

View File

@@ -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": {

View File

@@ -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';

View File

@@ -608,7 +608,7 @@ const getHtml = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'https
<span class="install-option-title">I have a plan</span>
<span class="install-option-desc">Login with Anthropic · Pro, Max, or API key</span>
</button>
<button class="install-option install-option-secondary" onclick="showFundsSelection()">
<button class="install-option install-option-secondary" id="installOpenCreditsOption" onclick="showFundsSelection()">
<span class="install-option-title">Just try it</span>
<span class="install-option-desc">No account needed · Pay as you go with OpenCredits</span>
</button>