From 843a6454bbd7dbae235d349d236404e76a312170 Mon Sep 17 00:00:00 2001 From: John Ye Date: Wed, 10 Dec 2025 14:49:18 +0800 Subject: [PATCH 1/2] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E5=88=86?= =?UTF-8?q?=E6=94=AF=E5=88=97=E8=A1=A8=EF=BC=8C=E6=B7=BB=E5=8A=A0=20PR=20#?= =?UTF-8?q?15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CLAUDE.md b/CLAUDE.md index b03a4ea..fabcc9b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -27,6 +27,7 @@ ByeByeCode 是一个 Rust 编写的 Claude Code 状态栏增强工具,用于 | `fix/issue-9-subscription-usage-display` | Issue #9 修复 | PR #10 | ✅ 已合并 | | `feature/progress-bar-usage-display` | 进度条功能 | PR #11 | ✅ 已合并 | | `fix/skip-free-subscription` | 跳过 FREE 套餐 | PR #12 | ✅ 已合并 | +| `feature/simplify-subscription-display` | 精简订阅显示格式 | PR #15 | 🔄 待审核 | ### 分支工作流 From f48c74984caab1b85d475b9f53f257a7642480b7 Mon Sep 17 00:00:00 2001 From: John Ye Date: Wed, 10 Dec 2025 15:01:21 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=2088code=20?= =?UTF-8?q?=E6=96=B0=E5=9F=9F=E5=90=8D=20(88code.ai)=20=E5=92=8C=E5=9B=BD?= =?UTF-8?q?=E5=86=85=E7=BA=BF=E8=B7=AF=20(rainapp.top)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 改进内容: 1. 新增支持 88code.ai 域名(新主域名) 2. 新增支持 rainapp.top 域名(国内线路) 3. 保持对旧域名 88code.org 的兼容 4. 更新默认 API URL 为新域名 88code.ai 支持的域名列表: - 88code.org(旧域名,兼容) - 88code.ai(新域名) - rainapp.top(国内线路) - packyapi.com(Packy) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/api/mod.rs | 18 +++++++++++++----- src/core/segments/byebyecode_subscription.rs | 2 +- src/core/segments/byebyecode_usage.rs | 4 ++-- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/api/mod.rs b/src/api/mod.rs index ae2721f..8d81d44 100644 --- a/src/api/mod.rs +++ b/src/api/mod.rs @@ -26,8 +26,8 @@ impl Default for ApiConfig { Self { enabled: false, api_key: String::new(), - usage_url: "https://www.88code.org/api/usage".to_string(), - subscription_url: "https://www.88code.org/api/subscription".to_string(), + usage_url: "https://www.88code.ai/api/usage".to_string(), + subscription_url: "https://www.88code.ai/api/subscription".to_string(), } } } @@ -257,7 +257,7 @@ fn get_claude_settings_path() -> Option { dirs::home_dir().map(|home| home.join(".claude").join("settings.json")) } -/// Read API key from Claude settings.json if base URL is 88code.org or packyapi.com +/// Read API key from Claude settings.json if base URL is 88code or packyapi pub fn get_api_key_from_claude_settings() -> Option { let settings_path = get_claude_settings_path()?; @@ -270,9 +270,13 @@ pub fn get_api_key_from_claude_settings() -> Option { let env = settings.env?; - // Support both 88code.org and packyapi.com + // Support 88code (both .org and .ai), packyapi.com, and rainapp.top (国内线路) if let Some(base_url) = env.base_url { - if base_url.contains("88code.org") || base_url.contains("packyapi.com") { + if base_url.contains("88code.org") + || base_url.contains("88code.ai") + || base_url.contains("packyapi.com") + || base_url.contains("rainapp.top") + { return env.auth_token; } } @@ -295,7 +299,11 @@ pub fn get_usage_url_from_claude_settings() -> Option { if base_url.contains("packyapi.com") { Some("https://www.packyapi.com/api/usage/token/".to_string()) + } else if base_url.contains("88code.ai") || base_url.contains("rainapp.top") { + // 新域名:88code.ai 和国内线路 rainapp.top + Some("https://www.88code.ai/api/usage".to_string()) } else if base_url.contains("88code.org") { + // 旧域名兼容 Some("https://www.88code.org/api/usage".to_string()) } else { None diff --git a/src/core/segments/byebyecode_subscription.rs b/src/core/segments/byebyecode_subscription.rs index e4d7910..fd01aed 100644 --- a/src/core/segments/byebyecode_subscription.rs +++ b/src/core/segments/byebyecode_subscription.rs @@ -68,7 +68,7 @@ pub fn collect(config: &Config, input: &InputData) -> Option { .map(|s| s.to_string()) }) .or_else(crate::api::get_usage_url_from_claude_settings) - .unwrap_or_else(|| "https://www.88code.org/api/usage".to_string()); + .unwrap_or_else(|| "https://www.88code.ai/api/usage".to_string()); if usage_url.contains("packyapi.com") { return None; diff --git a/src/core/segments/byebyecode_usage.rs b/src/core/segments/byebyecode_usage.rs index 0ee9431..eeef087 100644 --- a/src/core/segments/byebyecode_usage.rs +++ b/src/core/segments/byebyecode_usage.rs @@ -22,7 +22,7 @@ pub fn collect(config: &Config, input: &InputData) -> Option { .filter(|s| !s.is_empty()) .map(|s| s.to_string()) .or_else(crate::api::get_usage_url_from_claude_settings) - .unwrap_or_else(|| "https://www.88code.org/api/usage".to_string()); + .unwrap_or_else(|| "https://www.88code.ai/api/usage".to_string()); // 根据 usage_url 判断是哪个服务,并设置动态图标 let service_name = if usage_url.contains("packyapi.com") { @@ -58,7 +58,7 @@ pub fn collect(config: &Config, input: &InputData) -> Option { .get("subscription_url") .and_then(|v| v.as_str()) .map(|s| s.to_string()) - .unwrap_or_else(|| "https://www.88code.org/api/subscription".to_string()); + .unwrap_or_else(|| "https://www.88code.ai/api/subscription".to_string()); // 从输入数据获取当前使用的模型 let model_id = &input.model.id;