Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Sources/CodexBar/MenuCardView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -906,9 +906,9 @@ extension UsageMenuCardView.Model {
let openAIAPIUsage = input.snapshot?.openAIAPIUsage
let inlineUsageDashboard = Self.inlineUsageDashboard(input: input)
let usageNotes = Self.usageNotes(input: input)
let rawCreditsText: String? = if input.provider == .openrouter {
nil
} else if input.codexProjection != nil, !input.showOptionalCreditsAndExtraUsage {
let rawCreditsText: String? = if input.provider == .openrouter ||
!input.showOptionalCreditsAndExtraUsage
{
nil
} else {
Self.creditsLine(
Expand All @@ -925,6 +925,7 @@ extension UsageMenuCardView.Model {
input.snapshot?.identity?.loginMethod == "Admin API"
let isRequiredOpenCodeZenBalance = Self.isRequiredOpenCodeZenBalance(input.snapshot)
let hidesOptionalProviderCost = ((input.provider == .claude && !isClaudeAdminAPI) ||
input.provider == .cursor ||
input.provider == .factory ||
input.provider == .devin ||
(input.provider == .opencodego && !isRequiredOpenCodeZenBalance)) &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,10 @@ struct CursorProviderImplementation: ProviderImplementation {

@MainActor
func appendUsageMenuEntries(context: ProviderMenuUsageContext, entries: inout [ProviderMenuEntry]) {
guard let cost = context.snapshot?.providerCost, cost.currencyCode != "Quota" else { return }
guard context.settings.showOptionalCreditsAndExtraUsage,
let cost = context.snapshot?.providerCost,
cost.currencyCode != "Quota"
else { return }
let used = UsageFormatter.currencyString(cost.used, currencyCode: cost.currencyCode)
if cost.limit > 0 {
let limitStr = UsageFormatter.currencyString(cost.limit, currencyCode: cost.currencyCode)
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/ar.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
"show_provider_changelog_links_title" = "اعرض روابط سجل التغييرات لمزود الخدمة";
"show_provider_changelog_links_subtitle" = "يضيف روابط ملاحظات الإصدار لمزودي الخدمة المدعومين بدعم CLI إلى القائمة.";
"show_credits_extra_usage_title" = "اعتمادات العرض + الاستخدام الإضافي";
"show_credits_extra_usage_subtitle" = "عرض أقسام Codex الاعتمادات و Claude الاستخدام الإضافي في القائمة.";
"show_credits_extra_usage_subtitle" = "عرض الأرصدة والاستخدام الإضافي لموفري الخدمات المدعومين.";
"multi_account_layout_title" = "تخطيط الحسابات المتعددة";
"multi_account_layout_subtitle" = "اختر تبديل الحسابات المجزأة أو بطاقات الحساب المكدسة.";
"multi_account_layout_segmented" = "مقسم";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/ca.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@
"show_provider_changelog_links_title" = "Mostreu els enllaços al registre de canvis del proveïdor";
"show_provider_changelog_links_subtitle" = "Afegiu al menú enllaços a les notes de versió dels proveïdors compatibles basats en CLI.";
"show_credits_extra_usage_title" = "Mostreu crèdits + ús addicional";
"show_credits_extra_usage_subtitle" = "Mostreu les seccions de Crèdits de Codex i Ús addicional de Claude al menú.";
"show_credits_extra_usage_subtitle" = "Mostra els crèdits i l’ús addicional dels proveïdors compatibles.";
"multi_account_layout_title" = "Disposició multicompte";
"multi_account_layout_subtitle" = "Trieu el canvi de compte segmentat o targetes de compte apilades.";
"multi_account_layout_segmented" = "Segmentat";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@
"show_provider_changelog_links_title" = "Links zum Änderungsprotokoll des Anbieters anzeigen";
"show_provider_changelog_links_subtitle" = "Fügt dem Menü Versionshinweise-Links für unterstützte CLI-gestützte Anbieter hinzu.";
"show_credits_extra_usage_title" = "Credits + zusätzliche Nutzung anzeigen";
"show_credits_extra_usage_subtitle" = "Zeigen Sie die Nutzungsabschnitte \"Codex Credits\" und \"Claude Extra\" im Menü an.";
"show_credits_extra_usage_subtitle" = "Zeigt Guthaben und zusätzliche Nutzung für unterstützte Anbieter.";
"multi_account_layout_title" = "Layout für mehrere Konten";
"multi_account_layout_subtitle" = "Wählen Sie segmentierte Kontoumschaltung oder gestapelte Kontokarten.";
"multi_account_layout_segmented" = "Segmentiert";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
"show_provider_changelog_links_title" = "Show provider changelog links";
"show_provider_changelog_links_subtitle" = "Adds release-notes links for supported CLI-backed providers to the menu.";
"show_credits_extra_usage_title" = "Show credits & extra usage";
"show_credits_extra_usage_subtitle" = "Show Codex Credits and Claude Extra usage sections in the menu.";
"show_credits_extra_usage_subtitle" = "Show credits and extra usage for supported providers.";
"multi_account_layout_title" = "Multi-account layout";
"multi_account_layout_subtitle" = "Choose segmented account switching or stacked account cards.";
"multi_account_layout_segmented" = "Segmented";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/es.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -576,7 +576,7 @@
"show_provider_changelog_links_title" = "Mostrar enlaces al registro de cambios del proveedor";
"show_provider_changelog_links_subtitle" = "Añade al menú enlaces a las notas de versión de los proveedores compatibles basados en CLI.";
"show_credits_extra_usage_title" = "Mostrar créditos + uso adicional";
"show_credits_extra_usage_subtitle" = "Mostrar las secciones de Créditos de Codex y Uso adicional de Claude en el menú.";
"show_credits_extra_usage_subtitle" = "Muestra créditos y uso adicional para los proveedores compatibles.";
"multi_account_layout_title" = "Diseño multicuenta";
"multi_account_layout_subtitle" = "Elige cambio de cuenta segmentado o tarjetas de cuenta apiladas.";
"multi_account_layout_segmented" = "Segmentado";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/fa.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
"show_provider_changelog_links_title" = "لینک های تغییرات ارائه دهنده را نمایش دهید";
"show_provider_changelog_links_subtitle" = "لینک های یادداشت های انتشار برای ارائه دهندگان پشتیبانی شده با پشتیبانی CLI به منو اضافه می شود.";
"show_credits_extra_usage_title" = "نمایش اعتبارها + استفاده اضافی";
"show_credits_extra_usage_subtitle" = "بخش های Codex اعتبارها و Claude استفاده اضافی را در منو نمایش دهید.";
"show_credits_extra_usage_subtitle" = "اعتبارها و استفادهٔ اضافی را برای ارائه‌دهندگان پشتیبانی‌شده نمایش دهید.";
"multi_account_layout_title" = "چیدمان چندحسابی";
"multi_account_layout_subtitle" = "کارت های حساب سوئیچینگ تقسیم شده یا کارت های حساب انباشته را انتخاب کنید.";
"multi_account_layout_segmented" = "بخش بندی شده";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/fr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
"show_provider_changelog_links_title" = "Afficher les liens du journal des modifications du fournisseur";
"show_provider_changelog_links_subtitle" = "Ajoute au menu des liens de notes de version pour les fournisseurs pris en charge par CLI.";
"show_credits_extra_usage_title" = "Afficher les crédits + utilisation supplémentaire";
"show_credits_extra_usage_subtitle" = "Afficher les sections d'utilisation des crédits Codex et de Claude Extra dans le menu.";
"show_credits_extra_usage_subtitle" = "Afficher les crédits et l’utilisation supplémentaire pour les fournisseurs compatibles.";
"multi_account_layout_title" = "Disposition multi-comptes";
"multi_account_layout_subtitle" = "Choisissez un changement de compte segmenté ou des cartes de compte empilées.";
"multi_account_layout_segmented" = "Segmenté";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/gl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
"show_provider_changelog_links_title" = "Amosar as ligazóns ao rexistro de cambios do provedor";
"show_provider_changelog_links_subtitle" = "Engade ao menú enlaces ás notas de versión dos provedores compatibles baseados en CLI.";
"show_credits_extra_usage_title" = "Amosar créditos + uso adicional";
"show_credits_extra_usage_subtitle" = "Amosa as seccións de Créditos de Codex e Uso adicional de Claude no menú.";
"show_credits_extra_usage_subtitle" = "Amosa créditos e uso adicional para os provedores compatibles.";
"multi_account_layout_title" = "Disposición multiconta";
"multi_account_layout_subtitle" = "Escolle o cambio de conta segmentado ou tarxetas de conta apiladas.";
"multi_account_layout_segmented" = "Segmentado";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/id.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
"show_provider_changelog_links_title" = "Tampilkan tautan changelog penyedia";
"show_provider_changelog_links_subtitle" = "Menambahkan tautan catatan rilis untuk penyedia berbasis CLI yang didukung ke menu.";
"show_credits_extra_usage_title" = "Tampilkan kredit + penggunaan ekstra";
"show_credits_extra_usage_subtitle" = "Tampilkan bagian Kredit Codex dan penggunaan Ekstra Claude di menu.";
"show_credits_extra_usage_subtitle" = "Tampilkan kredit dan penggunaan tambahan untuk penyedia yang didukung.";
"multi_account_layout_title" = "Tata letak multi-akun";
"multi_account_layout_subtitle" = "Pilih pengalihan akun tersegmentasi atau kartu akun bertumpuk.";
"multi_account_layout_segmented" = "Tersegmentasi";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/it.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
"show_provider_changelog_links_title" = "Mostra link changelog provider";
"show_provider_changelog_links_subtitle" = "Aggiunge link alle note di rilascio per i provider CLI supportati.";
"show_credits_extra_usage_title" = "Mostra crediti + uso extra";
"show_credits_extra_usage_subtitle" = "Mostra nel menu le sezioni Crediti Codex e Uso extra Claude.";
"show_credits_extra_usage_subtitle" = "Mostra crediti e utilizzo extra per i provider supportati.";
"multi_account_layout_title" = "Layout multi-account";
"multi_account_layout_subtitle" = "Scegli tra selezione segmentata o schede account impilate.";
"multi_account_layout_segmented" = "Segmentato";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
"show_provider_changelog_links_title" = "プロバイダの変更履歴リンクを表示";
"show_provider_changelog_links_subtitle" = "対応する CLI ベースのプロバイダのリリースノートへのリンクをメニューに追加します。";
"show_credits_extra_usage_title" = "クレジットと追加使用量を表示";
"show_credits_extra_usage_subtitle" = "Codex クレジットと Claude 追加使用量のセクションをメニューに表示します。";
"show_credits_extra_usage_subtitle" = "対応プロバイダーのクレジットと追加使用量を表示します。";
"multi_account_layout_title" = "複数アカウントのレイアウト";
"multi_account_layout_subtitle" = "セグメント式のアカウント切替か、積み重ね式のアカウントカードを選択します。";
"multi_account_layout_segmented" = "セグメント";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@
"show_provider_changelog_links_title" = "공급자 변경 로그 링크 표시";
"show_provider_changelog_links_subtitle" = "지원되는 CLI 기반 공급자의 릴리스 노트 링크를 메뉴에 추가합니다.";
"show_credits_extra_usage_title" = "크레딧 + 추가 사용량 표시";
"show_credits_extra_usage_subtitle" = "메뉴에 Codex 크레딧 및 Claude 추가 사용량 섹션을 표시합니다.";
"show_credits_extra_usage_subtitle" = "지원되는 제공업체의 크레딧 및 추가 사용량을 표시합니다.";
"multi_account_layout_title" = "다중 계정 레이아웃";
"multi_account_layout_subtitle" = "분할된 계정 전환 또는 쌓인 계정 카드를 선택하세요.";
"multi_account_layout_segmented" = "분할";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/nl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
"show_provider_changelog_links_title" = "Toon provider changelog-links";
"show_provider_changelog_links_subtitle" = "Voegt koppelingen naar release-opmerkingen voor ondersteunde CLI-ondersteunde providers toe aan het menu.";
"show_credits_extra_usage_title" = "Toon credits + extra gebruik";
"show_credits_extra_usage_subtitle" = "Toon Codex Credits en Claude Extra gebruikssecties in het menu.";
"show_credits_extra_usage_subtitle" = "Toon tegoeden en extra gebruik voor ondersteunde providers.";
"multi_account_layout_title" = "Indeling voor meerdere accounts";
"multi_account_layout_subtitle" = "Kies voor gesegmenteerd wisselen tussen accounts of gestapelde accountkaarten.";
"multi_account_layout_segmented" = "Gesegmenteerd";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/pl.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@
"show_provider_changelog_links_title" = "Pokaż linki do changelogów dostawców";
"show_provider_changelog_links_subtitle" = "Dodaje linki do informacji o wydaniach dla obsługiwanych dostawców CLI w menu.";
"show_credits_extra_usage_title" = "Pokaż kredyty + dodatkowe użycie";
"show_credits_extra_usage_subtitle" = "Pokazuje sekcje Codex Credits i Claude Extra usage w menu.";
"show_credits_extra_usage_subtitle" = "Pokazuje kredyty i dodatkowe użycie dla obsługiwanych dostawców.";
"multi_account_layout_title" = "Układ wielu kont";
"multi_account_layout_subtitle" = "Wybierz przełączanie segmentowe kont lub ułożone karty kont.";
"multi_account_layout_segmented" = "Segmentowy";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/pt-BR.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@
"show_provider_changelog_links_title" = "Mostrar links de changelog dos provedores";
"show_provider_changelog_links_subtitle" = "Adiciona links de notas de versão para provedores baseados em CLI compatíveis no menu.";
"show_credits_extra_usage_title" = "Mostrar créditos + uso extra";
"show_credits_extra_usage_subtitle" = "Mostra as seções de créditos do Codex e uso extra do Claude no menu.";
"show_credits_extra_usage_subtitle" = "Mostra créditos e uso extra para provedores compatíveis.";
"multi_account_layout_title" = "Layout de múltiplas contas";
"multi_account_layout_subtitle" = "Escolha alternância segmentada de contas ou cartões de contas empilhados.";
"multi_account_layout_segmented" = "Segmentado";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/ru.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@
"show_provider_changelog_links_title" = "Показывать ссылки на журналы изменений провайдеров";
"show_provider_changelog_links_subtitle" = "Добавляет в меню ссылки на заметки к релизам для поддерживаемых CLI-провайдеров.";
"show_credits_extra_usage_title" = "Показывать кредиты и доп. использование";
"show_credits_extra_usage_subtitle" = "Показывать в меню разделы кредитов Codex и дополнительного использования Claude.";
"show_credits_extra_usage_subtitle" = "Показывать кредиты и дополнительное использование для поддерживаемых провайдеров.";
"multi_account_layout_title" = "Макет нескольких аккаунтов";
"multi_account_layout_subtitle" = "Выберите сегментированное переключение аккаунтов или сгруппированные карты аккаунтов.";
"multi_account_layout_segmented" = "Сегментированный";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/sv.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@
"show_provider_changelog_links_title" = "Visa länkar till leverantörers ändringsloggar";
"show_provider_changelog_links_subtitle" = "Lägger till länkar till utgåvekommentarer för stödda CLI-baserade leverantörer i menyn.";
"show_credits_extra_usage_title" = "Visa krediter och extra användning";
"show_credits_extra_usage_subtitle" = "Visa avsnitt för Codex-krediter och Claude Extra-användning i menyn.";
"show_credits_extra_usage_subtitle" = "Visa krediter och extra användning för leverantörer som stöds.";
"multi_account_layout_title" = "Layout för flera konton";
"multi_account_layout_subtitle" = "Välj segmenterad kontoväxling eller staplade kontokort.";
"multi_account_layout_segmented" = "Segmenterad";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/th.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
"show_provider_changelog_links_title" = "แสดงลิงก์บันทึกการเปลี่ยนแปลงของผู้ให้บริการ";
"show_provider_changelog_links_subtitle" = "เพิ่มลิงก์บันทึกประจํารุ่นสําหรับผู้ให้บริการที่ได้รับการสนับสนุน CLI ในเมนู";
"show_credits_extra_usage_title" = "แสดงเครดิต + การใช้งานเพิ่มเติม";
"show_credits_extra_usage_subtitle" = "แสดงส่วนเครดิต Codex และการใช้งานเพิ่มเติม Claude ในเมนู";
"show_credits_extra_usage_subtitle" = "แสดงเครดิตและการใช้งานเพิ่มเติมสำหรับผู้ให้บริการที่รองรับ";
"multi_account_layout_title" = "รูปแบบหลายบัญชี";
"multi_account_layout_subtitle" = "เลือกการสลับบัญชีแบบแบ่งกลุ่มหรือบัตรบัญชีแบบเรียงซ้อน";
"multi_account_layout_segmented" = "แบ่งกลุ่ม";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/tr.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@
"show_provider_changelog_links_title" = "Sağlayıcı değişiklik günlüğü bağlantılarını göster";
"show_provider_changelog_links_subtitle" = "Desteklenen CLI destekli sağlayıcılar için menüye sürüm notları bağlantıları ekler.";
"show_credits_extra_usage_title" = "Krediler + ekstra kullanımı göster";
"show_credits_extra_usage_subtitle" = "Menüde Codex Kredileri ve Claude Ekstra kullanım bölümlerini göster.";
"show_credits_extra_usage_subtitle" = "Desteklenen sağlayıcılar için kredileri ve ek kullanımı göster.";
"multi_account_layout_title" = "Çoklu hesap düzeni";
"multi_account_layout_subtitle" = "Bölümlü hesap değiştirme veya yığınlı hesap kartları seçin.";
"multi_account_layout_segmented" = "Bölümlü";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/uk.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@
"show_provider_changelog_links_title" = "Показати посилання журналу змін провайдера";
"show_provider_changelog_links_subtitle" = "Додає в меню посилання на примітки до випуску для підтримуваних постачальників, що підтримують CLI.";
"show_credits_extra_usage_title" = "Показати кредити + додаткове використання";
"show_credits_extra_usage_subtitle" = "Показати в меню розділи використання кредитів Codex і Claude Extra.";
"show_credits_extra_usage_subtitle" = "Показувати кредити та додаткове використання для підтримуваних постачальників.";
"multi_account_layout_title" = "Макет кількох облікових записів";
"multi_account_layout_subtitle" = "Виберіть сегментоване перемикання облікових записів або складені картки облікових записів.";
"multi_account_layout_segmented" = "Сегментований";
Expand Down
2 changes: 1 addition & 1 deletion Sources/CodexBar/Resources/vi.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@
"show_provider_changelog_links_title" = "Hiển thị Nhà cung cấp liên kết nhật ký thay đổi";
"show_provider_changelog_links_subtitle" = "Thêm liên kết ghi chú phát hành cho các nhà cung cấp được hỗ trợ CLI vào menu.";
"show_credits_extra_usage_title" = "Hiển thị tín dụng + phần Mức sử dụng";
"show_credits_extra_usage_subtitle" = "Hiển thị tín dụng Codex Claude Các phần Mức sử dụng bổ sung trong menu.";
"show_credits_extra_usage_subtitle" = "Hiển thị tín dụng và mức sử dụng bổ sung cho các nhà cung cấp được hỗ trợ.";
"multi_account_layout_title" = "Bố cục nhiều tài khoản";
"multi_account_layout_subtitle" = "Chọn thẻ tài khoản chuyển đổi phân đoạn hoặc thẻ tài khoản xếp chồng.";
"multi_account_layout_segmented" = "Được phân đoạn";
Expand Down
Loading
Loading