From f14971a98f90ef9e5fd352e5cd0c29f120736af5 Mon Sep 17 00:00:00 2001 From: Jiacheng Jiang Date: Thu, 5 Feb 2026 14:37:00 +0800 Subject: [PATCH 1/3] feat(kimi) fix kimi provider menu bar order --- Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift b/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift index c39e1602..4e96e38a 100644 --- a/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift +++ b/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift @@ -73,8 +73,8 @@ extension KimiUsageSnapshot { loginMethod: nil) return UsageSnapshot( - primary: weeklyWindow, - secondary: rateLimitWindow, + primary: rateLimitWindow ?? weeklyWindow, + secondary: weeklyWindow, tertiary: nil, providerCost: nil, updatedAt: self.updatedAt, From 257ab7bd87921b7d8480926ef62bb5b8c07bf5cd Mon Sep 17 00:00:00 2001 From: Jiacheng Jiang Date: Thu, 5 Feb 2026 20:09:08 +0800 Subject: [PATCH 2/3] fix(kimi): swap UI labels to match usage data order MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Following the data swap in commit f14971a where rate limit became primary and weekly became secondary, update the UI labels to match: - sessionLabel (shown for primary): "Weekly" → "Rate Limit" - weeklyLabel (shown for secondary): "Rate Limit" → "Weekly" This ensures the UI displays: - "Rate Limit" label with rate limit data - "Weekly" label with weekly data Co-Authored-By: Claude Sonnet 4.5 --- .../CodexBarCore/Providers/Kimi/KimiProviderDescriptor.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/CodexBarCore/Providers/Kimi/KimiProviderDescriptor.swift b/Sources/CodexBarCore/Providers/Kimi/KimiProviderDescriptor.swift index 711c20bc..bd7392ba 100644 --- a/Sources/CodexBarCore/Providers/Kimi/KimiProviderDescriptor.swift +++ b/Sources/CodexBarCore/Providers/Kimi/KimiProviderDescriptor.swift @@ -10,8 +10,8 @@ public enum KimiProviderDescriptor { metadata: ProviderMetadata( id: .kimi, displayName: "Kimi", - sessionLabel: "Weekly", - weeklyLabel: "Rate Limit", + sessionLabel: "Rate Limit", + weeklyLabel: "Weekly", opusLabel: nil, supportsOpus: false, supportsCredits: false, From 36ba32ba9b55be8ea13956763f6303466645fd86 Mon Sep 17 00:00:00 2001 From: Jiacheng Jiang Date: Thu, 5 Feb 2026 22:37:30 +0800 Subject: [PATCH 3/3] fix(kimi): avoid duplicate weekly usage when rate limit is missing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When rateLimitWindow is nil, set secondary to nil instead of weeklyWindow to prevent showing the same weekly metric twice under different labels. Before: - No rate limit → primary: weekly, secondary: weekly (duplicate) After: - No rate limit → primary: weekly, secondary: nil (correct) - Has rate limit → primary: rate limit, secondary: weekly (correct) Co-Authored-By: Claude Sonnet 4.5 --- Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift b/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift index 4e96e38a..70ccca40 100644 --- a/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift +++ b/Sources/CodexBarCore/Providers/Kimi/KimiUsageSnapshot.swift @@ -74,7 +74,7 @@ extension KimiUsageSnapshot { return UsageSnapshot( primary: rateLimitWindow ?? weeklyWindow, - secondary: weeklyWindow, + secondary: rateLimitWindow != nil ? weeklyWindow : nil, tertiary: nil, providerCost: nil, updatedAt: self.updatedAt,