mirror of
https://github.com/andrepimenta/claude-code-chat.git
synced 2026-05-30 00:05:44 +08:00
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:
@@ -6,7 +6,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
VERSION="2.0.4"
|
VERSION="2.0.5"
|
||||||
OUTPUT_NAME="vsix-claude-code-chat-${VERSION}.vsix"
|
OUTPUT_NAME="vsix-claude-code-chat-${VERSION}.vsix"
|
||||||
|
|
||||||
echo "Building Open VSIX version ${VERSION}..."
|
echo "Building Open VSIX version ${VERSION}..."
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"name": "claude-code-chat",
|
"name": "claude-code-chat",
|
||||||
"displayName": "Chat for Claude Code",
|
"displayName": "Chat for Claude Code",
|
||||||
"description": "Beautiful Claude Code Chat Interface for VS Code",
|
"description": "Beautiful Claude Code Chat Interface for VS Code",
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"publisher": "AndrePimenta",
|
"publisher": "AndrePimenta",
|
||||||
"author": "Andre Pimenta",
|
"author": "Andre Pimenta",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -2839,6 +2839,10 @@ const getScript = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'htt
|
|||||||
if (checkout) checkout.style.display = 'none';
|
if (checkout) checkout.style.display = 'none';
|
||||||
if (funds) funds.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');
|
sendStats('Login options shown');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2872,6 +2876,10 @@ const getScript = (isTelemetryEnabled: boolean, opencreditsApiUrl: string = 'htt
|
|||||||
const successEl = document.getElementById('installSuccess');
|
const successEl = document.getElementById('installSuccess');
|
||||||
successEl.style.display = 'flex';
|
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) {
|
if (success) {
|
||||||
sendStats('Install success');
|
sendStats('Install success');
|
||||||
successEl.querySelector('.install-success-text').textContent = 'Installed';
|
successEl.querySelector('.install-success-text').textContent = 'Installed';
|
||||||
|
|||||||
@@ -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-title">I have a plan</span>
|
||||||
<span class="install-option-desc">Login with Anthropic · Pro, Max, or API key</span>
|
<span class="install-option-desc">Login with Anthropic · Pro, Max, or API key</span>
|
||||||
</button>
|
</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-title">Just try it</span>
|
||||||
<span class="install-option-desc">No account needed · Pay as you go with OpenCredits</span>
|
<span class="install-option-desc">No account needed · Pay as you go with OpenCredits</span>
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Reference in New Issue
Block a user