diff --git a/CLAUDE.md b/CLAUDE.md index fabcc9b..2fb0c2b 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -28,6 +28,7 @@ ByeByeCode 是一个 Rust 编写的 Claude Code 状态栏增强工具,用于 | `feature/progress-bar-usage-display` | 进度条功能 | PR #11 | ✅ 已合并 | | `fix/skip-free-subscription` | 跳过 FREE 套餐 | PR #12 | ✅ 已合并 | | `feature/simplify-subscription-display` | 精简订阅显示格式 | PR #15 | 🔄 待审核 | +| `feature/support-new-88code-domains` | 支持新域名 88code.ai | PR #16 | 🔄 待审核 | ### 分支工作流 diff --git a/src/core/segments/byebyecode_subscription.rs b/src/core/segments/byebyecode_subscription.rs index 660c028..09952d3 100644 --- a/src/core/segments/byebyecode_subscription.rs +++ b/src/core/segments/byebyecode_subscription.rs @@ -115,11 +115,14 @@ pub fn collect(config: &Config, input: &InputData) -> Option { } // 过滤掉已禁用的订阅和已过期的订阅(剩余天数 <= 0) - let active_subscriptions: Vec<_> = subscriptions + let mut active_subscriptions: Vec<_> = subscriptions .iter() .filter(|sub| sub.is_active && sub.remaining_days > 0) .collect(); + // 按剩余天数升序排序(快过期的排在前面) + active_subscriptions.sort_by(|a, b| a.remaining_days.cmp(&b.remaining_days)); + if active_subscriptions.is_empty() { return Some(SegmentData { primary: "未订阅".to_string(),