From 4c0b2aaedbe62bfb4baeb61cad883cd66174aa4c Mon Sep 17 00:00:00 2001 From: claude-code-best Date: Fri, 3 Apr 2026 23:57:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=BB=95=E8=BF=87=20Claude=20Code=20?= =?UTF-8?q?=E5=86=85=E7=9A=84=20claude=20=E7=9A=84=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E9=9C=80=E8=A6=81;=20=E4=BD=86=E6=98=AF=E6=B5=8F=E8=A7=88?= =?UTF-8?q?=E5=99=A8=E6=89=A9=E5=B1=95=E8=BF=98=E6=98=AF=E8=A6=81=E6=9D=83?= =?UTF-8?q?=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/commands.ts | 2 +- src/commands/chrome/chrome.tsx | 4 ++-- src/commands/chrome/index.ts | 2 +- src/hooks/useChromeExtensionNotification.tsx | 9 +-------- src/main.tsx | 2 +- 5 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/commands.ts b/src/commands.ts index 10f03b222..8cae75452 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -415,7 +415,7 @@ const getWorkflowCommands = feature('WORKFLOW_SCRIPTS') * so this must be re-evaluated on every getCommands() call. */ export function meetsAvailabilityRequirement(cmd: Command): boolean { - if (!cmd.availability) return true + if (!cmd.availability || cmd.availability.length === 0) return true for (const a of cmd.availability) { switch (a) { case 'claude-ai': diff --git a/src/commands/chrome/chrome.tsx b/src/commands/chrome/chrome.tsx index 775005568..b659c2e80 100644 --- a/src/commands/chrome/chrome.tsx +++ b/src/commands/chrome/chrome.tsx @@ -186,7 +186,7 @@ function ClaudeInChromeMenu(t0) { } else { options = $[8]; } - const isDisabled = isWSL || true && !isClaudeAISubscriber; + const isDisabled = isWSL; let t5; if ($[18] !== onDone) { t5 = () => onDone(); @@ -212,7 +212,7 @@ function ClaudeInChromeMenu(t0) { } let t8; if ($[23] !== isClaudeAISubscriber) { - t8 = true && !isClaudeAISubscriber && Claude in Chrome requires a claude.ai subscription.; + t8 = false; $[23] = isClaudeAISubscriber; $[24] = t8; } else { diff --git a/src/commands/chrome/index.ts b/src/commands/chrome/index.ts index 0e9af5ff3..6e5b4f82f 100644 --- a/src/commands/chrome/index.ts +++ b/src/commands/chrome/index.ts @@ -4,7 +4,7 @@ import type { Command } from '../../commands.js' const command: Command = { name: 'chrome', description: 'Claude in Chrome (Beta) settings', - availability: ['claude-ai'], + availability: [], isEnabled: () => !getIsNonInteractiveSession(), type: 'local-jsx', load: () => import('./chrome.js'), diff --git a/src/hooks/useChromeExtensionNotification.tsx b/src/hooks/useChromeExtensionNotification.tsx index beef384f3..a32aac968 100644 --- a/src/hooks/useChromeExtensionNotification.tsx +++ b/src/hooks/useChromeExtensionNotification.tsx @@ -21,14 +21,7 @@ async function _temp() { if (!shouldEnableClaudeInChrome(chromeFlag)) { return null; } - if (true && !isClaudeAISubscriber()) { - return { - key: "chrome-requires-subscription", - jsx: Claude in Chrome requires a claude.ai subscription, - priority: "immediate", - timeoutMs: 5000 - }; - } + // Subscription check bypassed const installed = await isChromeExtensionInstalled(); if (!installed && !isRunningOnHomespace()) { return { diff --git a/src/main.tsx b/src/main.tsx index ccb6097a0..2e6c43582 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -1525,7 +1525,7 @@ async function run(): Promise { }; // Store the explicit CLI flag so teammates can inherit it setChromeFlagOverride(chromeOpts.chrome); - const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome) && ((process.env.USER_TYPE) === 'ant' || isClaudeAISubscriber()); + const enableClaudeInChrome = shouldEnableClaudeInChrome(chromeOpts.chrome); const autoEnableClaudeInChrome = !enableClaudeInChrome && shouldAutoEnableClaudeInChrome(); if (enableClaudeInChrome) { const platform = getPlatform();