diff --git a/CHANGELOG.md b/CHANGELOG.md index d8fc36e5..7a1d6d30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ Notable changes to Claude Code Usage Monitor are documented here, newest first. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), with changes grouped into Added, Changed, Fixed, and Removed where applicable. +## [Unreleased] + +### Added + +- Add Mistral as a provider: shows Vibe Code credits and La Plateforme API credits (both monthly budgets) in the widget. Reads `MISTRAL_API_KEY` or the Vibe CLI's `~/.vibe/.env`. + ## [2.23.6] - 2026-11-11 ### Fixed diff --git a/README.md b/README.md index 8a62fce5..cc1769b4 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ![Windows](https://img.shields.io/badge/platform-Windows-blue) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) -A lightweight, open-source Windows taskbar widget for monitoring Claude Code usage limits and reset times. It can also display usage for Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, and GitHub Copilot. +A lightweight, open-source Windows taskbar widget for monitoring Claude Code usage limits and reset times. It can also display usage for Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, GitHub Copilot, and Mistral. See the [user guide](USER_GUIDE.md) for theme customisation and everyday settings, or the [changelog](CHANGELOG.md) for version history and notable changes. @@ -14,7 +14,7 @@ or the [changelog](CHANGELOG.md) for version history and notable changes. - Displays current usage and time remaining until each limit resets - Counts usage up from zero or down from the full allowance, whichever you prefer -- Supports Claude Code, Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, and GitHub Copilot +- Supports Claude Code, Codex, Google Antigravity, OpenCode Go, Cursor, Grok Build, GitHub Copilot, and Mistral - Supports multiple accounts for Claude Code and Codex - Lives in the Windows taskbar with quick controls in the system tray - Supports multiple monitors and Windows startup @@ -72,6 +72,7 @@ In the default theme, left-click a provider tray icon to show or hide the widget | Cursor | Sign in to Cursor, then enable it in **Providers**. The local session is detected automatically. | | Grok Build | Run `grok login` in the Grok Build CLI, then enable Grok in **Providers**. The signed-in session is detected automatically. | | GitHub Copilot | Sign in with the Copilot CLI (`copilot`, then `/login`) or the GitHub CLI (`gh auth login`), then enable Copilot in **Providers**. The stored login is detected automatically. | +| Mistral | Set `MISTRAL_API_KEY`, or sign in with the official Vibe CLI (the monitor reads `%USERPROFILE%\.vibe\.env`; set `VIBE_HOME` if the CLI uses another home), or the Windows Credential Manager entry `ai.mistral.vibe` written by `vibe --setup` (sign-in with the Vibe CLI). Enable Mistral in **Providers**. | For OpenCode Go, set `OPENCODE_GO_WORKSPACE_ID` and `OPENCODE_GO_AUTH_COOKIE`, or create `%APPDATA%\opencode-go\config.json`: @@ -84,6 +85,8 @@ For OpenCode Go, set `OPENCODE_GO_WORKSPACE_ID` and `OPENCODE_GO_AUTH_COOKIE`, o The workspace ID is part of the OpenCode Go console URL: `https://opencode.ai/console//go`. Copy the `__Host-console_session` cookie from an authenticated `opencode.ai` browser session, including its name as shown above. A full Cookie header containing `__Host-console_session` or the legacy `auth` cookie is also accepted unchanged; no empty `auth=;` prefix is needed. Bare legacy `auth` cookie values remain supported. These formats work for both `authCookie` and `OPENCODE_GO_AUTH_COOKIE`. Set `OPENCODE_GO_CONFIG_FILE` to use a different config path. The monitor reads usage from the console JSON API using this workspace ID and cookie. +For Mistral, the monitor reads `MISTRAL_API_KEY` from the environment first; if it is unset, it falls back to the official Vibe CLI's `.env` file, at `%VIBE_HOME%\.env` when `VIBE_HOME` is set and `%USERPROFILE%\.vibe\.env` otherwise. The monitor reads the account's two monthly budgets, Vibe Code credits and API credits, from `https://api.mistral.ai/v1/billing/budget`. Both reset at the end of the calendar month, so the widget shows them as two lines sharing the same month-end reset. + For Cursor, `CURSOR_SESSION_TOKEN` can override the automatically detected local session. Grok Build usage comes from the session the CLI stores in `%USERPROFILE%\.grok\auth.json`, read through the same billing endpoint as the CLI's own `/usage` panel. Set `GROK_HOME` if the CLI keeps its home directory elsewhere. Only xAI sign-in entries are used; corporate identity-provider tokens and stored API keys are excluded. A bare `XAI_API_KEY` is not enough: the shared weekly allowance is only readable with a signed-in session. Grok reports one pool per billing period rather than a five-hour window, so the monitor shows it on the long-window row alongside the other providers, leaving the short-window row empty. On-demand spending replaces the pool on that row once any is used, as it already does for Claude Code and Codex. diff --git a/USER_GUIDE.md b/USER_GUIDE.md index e30aeb4f..02bae915 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -92,6 +92,13 @@ Custom theme files are stored in: These settings save automatically. The default theme adapts to enabled providers; a custom theme must include layers for the providers you want to display. +Most providers only need their own sign-in. Mistral also needs an API key: the +monitor reads `MISTRAL_API_KEY`, or the Vibe CLI's `.env` file at +`%USERPROFILE%\.vibe\.env`, or `%VIBE_HOME%\.env` when `VIBE_HOME` is set, or the +Windows Credential Manager entry `ai.mistral.vibe` written by `vibe --setup` +(sign-in with the Vibe CLI). Its Vibe Code credits and API credits are the +account's two monthly budgets, both resetting at the end of the month. + ## Show used or remaining allowance 1. Open **Settings > Display**. diff --git a/src/app_settings.rs b/src/app_settings.rs index 472e5d20..18aaef00 100644 --- a/src/app_settings.rs +++ b/src/app_settings.rs @@ -66,6 +66,8 @@ pub struct SettingsFile { show_grok: bool, #[serde(default)] show_copilot: bool, + #[serde(default)] + show_mistral: bool, #[serde(default = "default_true")] pub custom_theme_enabled: bool, /// Show what is left of each allowance instead of what has been spent, so @@ -140,6 +142,7 @@ impl Default for SettingsFile { show_cursor: false, show_grok: false, show_copilot: false, + show_mistral: false, custom_theme_enabled: true, usage_countdown: false, use_windows_default_font: true, @@ -239,6 +242,7 @@ impl SettingsFile { ProviderId::Cursor => self.show_cursor, ProviderId::Grok => self.show_grok, ProviderId::Copilot => self.show_copilot, + ProviderId::Mistral => self.show_mistral, } } @@ -287,6 +291,7 @@ impl SettingsFile { ProviderId::Cursor => self.show_cursor = enabled, ProviderId::Grok => self.show_grok = enabled, ProviderId::Copilot => self.show_copilot = enabled, + ProviderId::Mistral => self.show_mistral = enabled, } } @@ -654,6 +659,7 @@ mod tests { ProviderId::Cursor, ProviderId::Grok, ProviderId::Copilot, + ProviderId::Mistral, ])); let json = settings_json(&settings); @@ -664,6 +670,7 @@ mod tests { assert_eq!(json["show_cursor"], true); assert_eq!(json["show_grok"], true); assert_eq!(json["show_copilot"], true); + assert_eq!(json["show_mistral"], true); let decoded = decode_settings(&json.to_string()).unwrap(); assert_eq!(decoded.enabled_providers(), settings.enabled_providers()); diff --git a/src/context_menu.rs b/src/context_menu.rs index bf87f113..05a14ad4 100644 --- a/src/context_menu.rs +++ b/src/context_menu.rs @@ -424,6 +424,13 @@ pub fn classic_context_menu() -> ContextMenuDocument { provider: Provider::Copilot, }, ), + ContextMenuItem::action( + "provider-mistral", + "Mistral", + Action::ToggleProvider { + provider: Provider::Mistral, + }, + ), ], ); let languages = std::iter::once(ContextMenuItem::action( @@ -730,6 +737,9 @@ mod tests { assert!(serde_json::to_string(&menu) .unwrap() .contains("provider-copilot")); + assert!(serde_json::to_string(&menu) + .unwrap() + .contains("provider-mistral")); assert!(menu.items.iter().any(|item| { item.id == "toggle-widget" && matches!( diff --git a/src/icons/brand-marks.ttf b/src/icons/brand-marks.ttf index f05fc762..65e78a50 100644 Binary files a/src/icons/brand-marks.ttf and b/src/icons/brand-marks.ttf differ diff --git a/src/localization/locales/de.toml b/src/localization/locales/de.toml index 4550efd7..1fdf9914 100644 --- a/src/localization/locales/de.toml +++ b/src/localization/locales/de.toml @@ -65,6 +65,10 @@ opencode_window_title = "OpenCode-Nutzungsmonitor" cursor_window_title = "Cursor-Nutzungsmonitor" grok_window_title = "Grok-Nutzungsmonitor" copilot_window_title = "Copilot-Nutzungsmonitor" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral-Authentifizierungsfehler" +mistral_token_expired_body = "Legen Sie die Umgebungsvariable MISTRAL_API_KEY fest oder melden Sie sich mit der offiziellen Vibe-CLI an, sodass ~/.vibe/.env MISTRAL_API_KEY enthält. Danach aktualisieren Sie die Anwendung oder starten Sie sie neu." +mistral_window_title = "Mistral-Nutzungsmonitor" [translations] "Use Windows default font" = "Windows-Standardschrift verwenden" diff --git a/src/localization/locales/en.toml b/src/localization/locales/en.toml index 55d05362..c455ae1c 100644 --- a/src/localization/locales/en.toml +++ b/src/localization/locales/en.toml @@ -20,6 +20,10 @@ opencode_model = "OpenCode" cursor_model = "Cursor" grok_model = "Grok" copilot_model = "Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral Auth Error" +mistral_token_expired_body = "Set the MISTRAL_API_KEY environment variable, or sign in with the official Vibe CLI so ~/.vibe/.env contains MISTRAL_API_KEY. After that, refresh or restart this app." +mistral_window_title = "Mistral Usage Monitor" settings = "Settings" start_with_windows = "Start with Windows" language = "Language" diff --git a/src/localization/locales/es.toml b/src/localization/locales/es.toml index d19c1eb9..2d81fb04 100644 --- a/src/localization/locales/es.toml +++ b/src/localization/locales/es.toml @@ -65,6 +65,10 @@ opencode_window_title = "Monitor de uso de OpenCode" cursor_window_title = "Monitor de uso de Cursor" grok_window_title = "Monitor de uso de Grok" copilot_window_title = "Monitor de uso de Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Error de autenticación de Mistral" +mistral_token_expired_body = "Establece la variable de entorno MISTRAL_API_KEY o inicia sesión con la CLI oficial de Vibe para que ~/.vibe/.env contenga MISTRAL_API_KEY. Después, actualiza o reinicia esta aplicación." +mistral_window_title = "Monitor de uso de Mistral" [translations] "Use Windows default font" = "Usar la fuente predeterminada de Windows" diff --git a/src/localization/locales/fr.toml b/src/localization/locales/fr.toml index 828af6f6..17c4b326 100644 --- a/src/localization/locales/fr.toml +++ b/src/localization/locales/fr.toml @@ -65,6 +65,10 @@ opencode_window_title = "Moniteur d'utilisation OpenCode" cursor_window_title = "Moniteur d'utilisation Cursor" grok_window_title = "Moniteur d'utilisation Grok" copilot_window_title = "Moniteur d'utilisation Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Erreur d'authentification Mistral" +mistral_token_expired_body = "Définissez la variable d'environnement MISTRAL_API_KEY, ou connectez-vous avec la CLI Vibe officielle afin que ~/.vibe/.env contienne MISTRAL_API_KEY. Ensuite, actualisez ou redémarrez cette application." +mistral_window_title = "Moniteur d'utilisation Mistral" [translations] "Use Windows default font" = "Utiliser la police par défaut de Windows" diff --git a/src/localization/locales/ja.toml b/src/localization/locales/ja.toml index 86bb6dd0..9f7e46c3 100644 --- a/src/localization/locales/ja.toml +++ b/src/localization/locales/ja.toml @@ -1,125 +1,125 @@ code = "ja" native_name = "日本語" -locale_patterns = ["ja"] +locale_patterns = ['ja'] order = 5 update_via_winget = "WinGet で更新" windows_font_name = "yu-gothic-ui" windows_font_file = "YuGothM.ttc" [strings] -window_title = "Claude Code 使用量モニター" -refresh = "更新" -update_frequency = "更新間隔" -one_minute = "1分" -five_minutes = "5分" -fifteen_minutes = "15分" -one_hour = "1時間" +"antigravity_model" = "Antigravity" +"antigravity_token_expired_body" = "Antigravity を開いて再度サインインしてください。その後、このアプリを更新するか再起動してください。" +"antigravity_token_expired_title" = "Antigravity 認証エラー" +"antigravity_window_title" = "Antigravity 使用量モニター" +"applying_update" = "更新を適用しています..." +"check_for_updates" = "更新を確認" +"checking_for_updates" = "更新を確認しています..." +"claude_code_model" = "Claude Code" +"codex_model" = "Codex" +"codex_token_expired_body" = "ターミナルで 'codex' を実行し、サインインの案内に従ってください。その後、このアプリを更新または再起動してください。" +"codex_token_expired_title" = "Codex 認証エラー" +"codex_window_title" = "Codex 使用量モニター" +"copilot_model" = "Copilot" +"copilot_token_expired_body" = "Copilot CLI('copilot' を実行して /login)または GitHub CLI('gh auth login')でサインインするか、GH_TOKEN を設定してください。その後、このアプリを更新または再起動してください。" +"copilot_token_expired_title" = "Copilot 認証エラー" +"copilot_window_title" = "Copilot 使用量モニター" +"cursor_api_window" = "API" +"cursor_auto_window" = "Auto" +"cursor_model" = "Cursor" +"cursor_token_expired_body" = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), then refresh or restart this app." +"cursor_token_expired_title" = "Cursor Auth Error" +"cursor_window_title" = "Cursor 使用量モニター" +"day_suffix" = "日" +exit = "終了" +"fifteen_minutes" = "15分" +"five_minutes" = "5分" +"grok_model" = "Grok" +"grok_token_expired_body" = "ターミナルで 'grok login' を実行し、サインインの案内に従ってください。その後、このアプリを更新または再起動してください。" +"grok_token_expired_title" = "Grok 認証エラー" +"grok_window_title" = "Grok 使用量モニター" +"hour_suffix" = "時間" +language = "言語" +"minute_suffix" = "分" +"mistral_model" = "Mistral" +"mistral_token_expired_body" = "Set the MISTRAL_API_KEY environment variable, or sign in with the official Vibe CLI so ~/.vibe/.env contains MISTRAL_API_KEY. After that, refresh or restart this app." +"mistral_token_expired_title" = "Mistral Auth Error" +"mistral_window_title" = "Mistral Usage Monitor" models = "モデル" -claude_code_model = "Claude Code" -codex_model = "Codex" -antigravity_model = "Antigravity" -opencode_model = "OpenCode" -cursor_model = "Cursor" -grok_model = "Grok" -copilot_model = "Copilot" +now = "今" +"one_hour" = "1時間" +"one_minute" = "1分" +"opencode_model" = "OpenCode" +"opencode_token_expired_body" = "OpenCode Go の使用量を追跡するには、OPENCODE_GO_WORKSPACE_ID と OPENCODE_GO_AUTH_COOKIE を設定してください。README を参照し、その後このアプリを更新または再起動してください。" +"opencode_token_expired_title" = "OpenCode が見つかりません" +"opencode_window_title" = "OpenCode 使用量モニター" +refresh = "更新" +"second_suffix" = "秒" +"session_window" = "5h" settings = "設定" -start_with_windows = "Windows と同時に開始" -language = "言語" -system_default = "システム既定" -check_for_updates = "更新を確認" -checking_for_updates = "更新を確認しています..." +"start_with_windows" = "Windows と同時に開始" +"system_default" = "システム既定" +"token_expired_body" = "ターミナルで 'claude' を実行し、'/login' を使って案内に従ってください。その後、このアプリを更新するか再起動してください。" +"token_expired_title" = "認証エラー" +"up_to_date" = "既に最新バージョンです。" +"up_to_date_short" = "最新です" +"update_available" = "更新が利用可能です" +"update_failed" = "自動更新を完了できませんでした" +"update_frequency" = "更新間隔" +"update_in_progress" = "更新確認は既に実行中です。" +"update_prompt_now" = "バージョン {version} が利用可能です。今すぐ更新しますか?" +"update_to" = "更新先" updates = "更新" -update_in_progress = "更新確認は既に実行中です。" -up_to_date = "既に最新バージョンです。" -up_to_date_short = "最新です" -update_failed = "自動更新を完了できませんでした" -applying_update = "更新を適用しています..." -update_to = "更新先" -update_available = "更新が利用可能です" -update_prompt_now = "バージョン {version} が利用可能です。今すぐ更新しますか?" -exit = "終了" -session_window = "5h" -weekly_window = "7d" -cursor_auto_window = "Auto" -cursor_api_window = "API" -now = "今" -day_suffix = "日" -hour_suffix = "時間" -minute_suffix = "分" -second_suffix = "秒" -token_expired_title = "認証エラー" -token_expired_body = "ターミナルで 'claude' を実行し、'/login' を使って案内に従ってください。その後、このアプリを更新するか再起動してください。" -codex_token_expired_title = "Codex 認証エラー" -codex_token_expired_body = "ターミナルで 'codex' を実行し、サインインの案内に従ってください。その後、このアプリを更新または再起動してください。" -antigravity_token_expired_title = "Antigravity 認証エラー" -antigravity_token_expired_body = "Antigravity を開いて再度サインインしてください。その後、このアプリを更新するか再起動してください。" -opencode_token_expired_title = "OpenCode が見つかりません" -opencode_token_expired_body = "OpenCode Go の使用量を追跡するには、OPENCODE_GO_WORKSPACE_ID と OPENCODE_GO_AUTH_COOKIE を設定してください。README を参照し、その後このアプリを更新または再起動してください。" -cursor_token_expired_title = "Cursor Auth Error" -cursor_token_expired_body = "Sign in to Cursor (or set CURSOR_SESSION_TOKEN), then refresh or restart this app." -grok_token_expired_title = "Grok 認証エラー" -grok_token_expired_body = "ターミナルで 'grok login' を実行し、サインインの案内に従ってください。その後、このアプリを更新または再起動してください。" -copilot_token_expired_title = "Copilot 認証エラー" -copilot_token_expired_body = "Copilot CLI('copilot' を実行して /login)または GitHub CLI('gh auth login')でサインインするか、GH_TOKEN を設定してください。その後、このアプリを更新または再起動してください。" -codex_window_title = "Codex 使用量モニター" -antigravity_window_title = "Antigravity 使用量モニター" -opencode_window_title = "OpenCode 使用量モニター" -cursor_window_title = "Cursor 使用量モニター" -grok_window_title = "Grok 使用量モニター" -copilot_window_title = "Copilot 使用量モニター" +"weekly_window" = "7d" +"window_title" = "Claude Code 使用量モニター" [translations] -"Use Windows default font" = "Windows の既定のフォントを使用" -"Turn off to use Segoe UI for widget text" = "オフにするとウィジェットのテキストに Segoe UI を使用します" "Absolute value" = "絶対値" -"Action" = "Action" +Action = "Action" +Actions = "アクション" "Actions run from top to bottom in one update." = "アクションは1回の更新で上から順に実行されます。" -"actions" = "アクション" -"Actions" = "アクション" "Active provider" = "アクティブなプロバイダー" "Active theme" = "現在のテーマ" +Add = "加算" "Add an image to the asset library" = "Add an image to the asset library" "Add image" = "画像を追加" "Add images once, reuse them across themes, or drop image files here to import them." = "画像を一度追加してテーマ間で再利用するか、ここに画像ファイルをドロップしてインポートします。" "Add layer" = "レイヤーを追加" -"Add" = "加算" "Advanced expressions are supported inside a value token." = "値トークン内では高度な式も使用できます。" -"Aliased" = "Aliased" -"Align" = "配置" +Aliased = "Aliased" +Align = "配置" "All files" = "すべてのファイル" -"Anchor" = "アンカー" -"And" = "かつ" -"Angle" = "角度" +Anchor = "アンカー" +And = "かつ" +Angle = "角度" "Another context menu already uses the ID" = "Another context menu already uses the ID" -"Antialiased" = "Antialiased" -"Antigravity" = "Antigravity" -"Appearance" = "外観" -"Application" = "Application" -"Apply" = "適用" +Antialiased = "Antialiased" +Antigravity = "Antigravity" +Appearance = "外観" +Application = "Application" +Apply = "適用" "Are you sure you want to delete {name} from the asset library and all themes using it?" = "{name} をアセットライブラリと使用中のすべてのテーマから削除してもよろしいですか?" "Are you sure you want to delete {name}?" = "{name} を削除してもよろしいですか?" +Asset = "アセット" "Asset library" = "アセットライブラリ" -"Asset" = "アセット" -"Assets" = "アセット" +Assets = "アセット" +Automatic = "Automatic" "Automatic number" = "自動数値" -"Automatic" = "Automatic" -"Background" = "背景" -"Bold" = "Bold" +Background = "背景" +Bold = "Bold" +Border = "境界線" "Border colour" = "境界線の色" "Border width" = "境界線の幅" -"Border" = "境界線" "Bottom to top" = "Bottom to top" "Build and validate an expression using the values supported by the theme engine." = "テーマエンジンが対応する値を使って式を作成し、検証します。" "Build safe mouse actions that affect layers at runtime." = "実行時にレイヤーへ作用する安全なマウスアクションを作成します。" "Build text from regular words and correctly formatted provider values." = "通常の文字と正しく書式設定されたプロバイダー値からテキストを作成します。" -"Builder" = "ビルダー" +Builder = "ビルダー" "Built-in themes are read-only; duplicate the theme first" = "Built-in themes are read-only; duplicate the theme first" "Built-in themes cannot be deleted" = "Built-in themes cannot be deleted" -"built-in" = "組み込み" -"Cancel" = "キャンセル" -"Canvas" = "キャンバス" +Cancel = "キャンセル" +Canvas = "キャンバス" "Category:" = "カテゴリ:" -"Center" = "Center" +Center = "Center" "Check for updates" = "更新を確認" "Children layout" = "子要素のレイアウト" "Choose a managed image or add one from your computer." = "Choose a managed image or add one from your computer." @@ -127,38 +127,38 @@ copilot_window_title = "Copilot 使用量モニター" "Choose asset..." = "アセットを選択..." "Choose one action for this context menu item." = "このコンテキストメニュー項目のアクションを1つ選択します。" "Claude Code" = "Claude Code" -"Click" = "Click" -"Close asset library" = "Close asset library" +Click = "Click" "Close Builder" = "ビルダーを閉じる" -"Codex" = "Codex" +"Close asset library" = "Close asset library" +Codex = "Codex" "Collect usage from Anthropic" = "Anthropic から使用量を取得" "Collect usage from GitHub" = "GitHub から使用量を取得" "Collect usage from Google" = "Google から使用量を取得" "Collect usage from OpenAI" = "OpenAI から使用量を取得" "Collect usage from xAI" = "xAI から使用量を取得" -"Colour" = "色" -"Column" = "Column" +Colour = "色" +Column = "Column" "Conditional value" = "条件値" -"Constants" = "定数" +Constants = "定数" "Constrain a value" = "値を範囲内に制限" -"Contain" = "Contain" +Contain = "Contain" "Content type" = "コンテンツの種類" -"Context menu" = "コンテキストメニュー" "Context Menus" = "コンテキストメニュー" -"Copilot" = "Copilot" -"copy" = "copy" +"Context menu" = "コンテキストメニュー" +Copilot = "Copilot" "Corner radius" = "角の半径" "Count down what is left in supported themes" = "対応するテーマで残りの使用枠をカウントダウンする" -"Cover" = "Cover" +Cover = "Cover" +Create = "作成" "Create and edit themes" = "テーマの作成と編集" "Create copy" = "コピーを作成" -"Create" = "作成" "Cross-axis" = "交差軸" "Current result" = "現在の結果" -"Cursor" = "Cursor" -"Custom" = "Custom" +Cursor = "Cursor" +Custom = "Custom" "Data bar" = "データバー" "Decrease value" = "値を減らす" +Delete = "削除" "Delete asset?" = "アセットを削除しますか?" "Delete context menu" = "コンテキストメニューを削除" "Delete context menu?" = "コンテキストメニューを削除しますか?" @@ -166,71 +166,67 @@ copilot_window_title = "Copilot 使用量モニター" "Delete theme?" = "テーマを削除しますか?" "Delete this asset from the shared asset library?" = "Delete this asset from the shared asset library?" "Delete this theme?" = "このテーマを削除しますか?" -"Delete" = "削除" "Delete..." = "削除..." -"Desktop" = "Desktop" +Desktop = "Desktop" "Detailed duration" = "詳細な期間" -"Direction" = "方向" -"Disabled" = "無効" +Direction = "方向" +Disabled = "無効" +Discard = "破棄" "Discard action changes" = "アクションの変更を破棄" "Discard changes" = "変更を破棄" "Discard expression changes" = "式の変更を破棄" "Discard text changes" = "テキストの変更を破棄" -"Discard" = "破棄" "Dismiss error" = "エラーを閉じる" -"Display" = "表示" -"Divide" = "除算" +Display = "表示" +Divide = "除算" "Double click" = "Double click" "Double-click to rename" = "Double-click to rename" "Drag to reorder or change the parent" = "Drag to reorder or change the parent" +Duplicate = "複製" "Duplicate theme" = "テーマを複製" -"Duplicate" = "複製" "Duplicate..." = "複製..." -"e.g. false, 120, parent.width / 2" = "例: false、120、parent.width / 2" "Edge contrast" = "エッジのコントラスト" "Edit name" = "Edit name" "Edit quoted values in the action field for URLs, languages, and layer-action scripts." = "URL、言語、レイヤーアクションスクリプトは、アクション欄の引用符内を編集します。" +Enabled = "有効" "Enabled provider count" = "有効なプロバイダー数" -"Enabled" = "有効" -"End" = "終了" +End = "終了" "Enter actions..." = "アクションを入力..." "Enter an expression..." = "式を入力..." -"Equal" = "等しい" +Equal = "等しい" "Every 15 minutes" = "15分ごと" "Every 5 minutes" = "5分ごと" "Every hour" = "1時間ごと" "Every minute" = "毎分" -"Exit" = "終了" +Exit = "終了" "Expand or collapse" = "Expand or collapse" "Explorer controls this icon's position, overflow, drag order, and final display size. The root's width and height control its source artwork." = "Explorer controls this icon's position, overflow, drag order, and final display size. The root's width and height control its source artwork." -"Exponent" = "指数" +Exponent = "指数" "Export theme package" = "テーマパッケージをエクスポート" "Export..." = "エクスポート..." -"Expression" = "式" +Expression = "式" "Expression result is not finite" = "Expression result is not finite" -"False" = "偽" -"Fill" = "塗りつぶし" -"Fit" = "フィット" -"Floating" = "Floating" -"Font" = "フォント" -"Format" = "形式" -"Freeform" = "Freeform" -"Functions" = "関数" -"ƒx Values" = "ƒx Values" -"Gap" = "間隔" -"General" = "一般" -"Gradient" = "グラデーション" +False = "偽" +Fill = "塗りつぶし" +Fit = "フィット" +Floating = "Floating" +Font = "フォント" +Format = "形式" +Freeform = "Freeform" +Functions = "関数" +Gap = "間隔" +General = "一般" +Gradient = "グラデーション" "Greater or equal" = "以上" "Greater than" = "より大きい" -"Grok" = "Grok" -"Grouping" = "グループ化" -"Guide" = "ガイド" -"has been changed, what would you like to do?" = "が変更されました。どうしますか?" -"Height" = "高さ" -"Host" = "Host" +Grok = "Grok" +Grouping = "グループ化" +Guide = "ガイド" +Height = "高さ" +Host = "Host" "How often provider usage is refreshed" = "プロバイダーの使用量を更新する間隔" -"Image" = "画像" -"Images" = "画像" +Image = "画像" +Images = "画像" "Import a theme or package" = "テーマまたはパッケージをインポート" "Import..." = "インポート..." "Increase value" = "値を増やす" @@ -239,118 +235,120 @@ copilot_window_title = "Copilot 使用量モニター" "Insert value" = "値を挿入" "Insert variable" = "変数を挿入" "Invalid expression" = "無効な式" -"Item" = "Item" -"Label" = "Label" -"Labels" = "ラベル" +Item = "Item" +"Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" +Label = "Label" +Labels = "ラベル" +Language = "言語" "Language used by the app and widget" = "アプリとウィジェットで使用する言語" -"Language" = "言語" "Larger value" = "大きい値" "Launch the monitor when you sign in" = "サインイン時にモニターを起動" +Layer = "レイヤー" "Layer actions" = "レイヤーアクション" -"Layer" = "レイヤー" -"Layers" = "レイヤー" -"Layout" = "レイアウト" +Layers = "レイヤー" +Layout = "レイアウト" +Left = "Left" "Left to right" = "Left to right" -"Left" = "Left" "Less or equal" = "以下" "Less than" = "より小さい" -"Light" = "Light" +Light = "Light" "Linear interpolation" = "線形補間" "Live apply" = "即時適用" "Live preview" = "ライブプレビュー" -"Medium" = "Medium" +"Lock in taskbar" = "Lock in taskbar" +Locked = "Locked" +Medium = "Medium" "Menu action" = "メニュー操作" -"Monitor" = "Monitor" +Monitor = "Monitor" "Mouse action" = "マウス操作" "Mouse enter" = "Mouse enter" "Mouse events" = "Mouse events" "Mouse leave" = "Mouse leave" -"Multiply" = "乗算" +Multiply = "乗算" +Name = "Name" "Name the editable copy" = "編集可能なコピーに名前を付けます" "Name the new theme" = "新しいテーマに名前を付けます" -"Name" = "Name" "Nearest integer" = "最も近い整数" +New = "新規" "New theme" = "新しいテーマ" -"New" = "新規" "No assets match this search." = "No assets match this search." "No images have been added yet. Use Add image to create the library." = "No images have been added yet. Use Add image to create the library." "No matching fonts" = "一致するフォントがありません" +None = "なし" "None (Container)" = "なし(コンテナー)" -"None" = "なし" +Not = "否定" "Not equal" = "等しくない" -"Not" = "否定" "Now label" = "「今」ラベル" "One decimal" = "小数第1位" "One menu action" = "メニューアクション1件" "Only http and https links are allowed." = "Only http and https links are allowed." "Only themes saved in Theme Studio can be deleted here" = "Only themes saved in Theme Studio can be deleted here" -"Open a theme" = "Open a theme" "Open Dashboard" = "ダッシュボードを開く" -"Open in Builder" = "ビルダーで開く" -"Open the asset library" = "アセットライブラリを開く" "Open Theme Studio" = "テーマスタジオを開く" "Open URL" = "URLを開く" +"Open a theme" = "Open a theme" +"Open in Builder" = "ビルダーで開く" +"Open the asset library" = "アセットライブラリを開く" "Open..." = "開く..." -"OpenCode" = "OpenCode" -"Operators" = "演算子" -"Options" = "オプション" -"Or" = "または" -"Original" = "Original" -"Percentage" = "パーセント" +OpenCode = "OpenCode" +Operators = "演算子" +Options = "オプション" +Or = "または" +Original = "Original" +Percentage = "パーセント" "Plain text" = "プレーンテキスト" "Position is managed by the parent container. X and Y are fine offsets." = "Position is managed by the parent container. X and Y are fine offsets." -"Positioning" = "配置" +Positioning = "配置" +Preview = "Preview" "Preview is empty" = "プレビューは空です" -"Preview" = "Preview" -"Properties" = "プロパティ" +Properties = "プロパティ" +Provider = "プロバイダー" "Provider values" = "プロバイダーの値" -"Provider" = "プロバイダー" "Provider:" = "プロバイダー:" -"Providers" = "プロバイダー" -"Radius" = "半径" -"Redo" = "やり直す" -"Reference" = "基準" +Providers = "プロバイダー" +Radius = "半径" +Redo = "やり直す" +Reference = "基準" +Refresh = "更新" "Refresh now" = "今すぐ更新" -"Refresh" = "更新" -"Regular" = "Regular" -"Remainder" = "剰余" -"Remaining" = "残量" -"Render" = "表示" -"rendered as" = "rendered as" -"Rendering" = "レンダリング" +Regular = "Regular" +Remainder = "剰余" +Remaining = "残量" +Render = "表示" +Rendering = "レンダリング" "Reset property" = "プロパティをリセット" "Reset removes the runtime override and restores the saved expression." = "リセットすると実行時の上書きが削除され、保存済みの式に戻ります。" "Reset zoom to 100%" = "Reset zoom to 100%" "Restore the undone change (Ctrl+Y)" = "Restore the undone change (Ctrl+Y)" +Right = "Right" "Right click" = "Right click" "Right to left" = "Right to left" -"Right" = "Right" -"Rotation" = "回転" +Rotation = "回転" "Round down" = "切り捨て" "Round up" = "切り上げ" -"Row" = "Row" +Row = "Row" "Run layer actions" = "レイヤーアクションを実行" +Save = "保存" "Save and continue" = "保存して続行" "Save changes?" = "変更を保存しますか?" "Save name" = "Save name" "Save or discard changes before importing" = "インポートする前に変更を保存または破棄してください" "Save or discard the current menu before switching" = "Save or discard the current menu before switching" "Save your changes before continuing?" = "続行する前に変更を保存しますか?" -"Save" = "保存" -"Scene" = "シーン" +Scene = "シーン" "Search assets..." = "アセットを検索..." "Search functions..." = "関数を検索..." "Search values..." = "値を検索..." "Search variables..." = "変数を検索..." "Segment gap" = "セグメント間隔" -"Segments" = "セグメント" +Segments = "セグメント" "Select a menu item to edit it." = "Select a menu item to edit it." "Select a provider value, choose its format, then insert it." = "プロバイダーの値と形式を選び、挿入します。" "Select an asset to delete" = "Select an asset to delete" "Select object" = "Select object" -"Self" = "自身" -"Semibold" = "Semibold" -"Separator" = "Separator" +Self = "自身" +Semibold = "Semibold" +Separator = "Separator" "Session remaining" = "セッション残量" "Session reset" = "セッションのリセット" "Session shown" = "セッション表示値" @@ -360,59 +358,61 @@ copilot_window_title = "Copilot 使用量モニター" "Set language" = "言語を設定" "Set property" = "プロパティを設定" "Set update frequency" = "更新頻度を設定" -"Settings" = "設定" +Settings = "設定" "Short duration" = "短い期間" "Show context menu" = "コンテキストメニューを表示" "Show dashboard" = "ダッシュボードを表示" "Show widget" = "ウィジェットを表示" -"Size" = "サイズ" +Size = "サイズ" "Smaller value" = "小さい値" "Solid colour" = "単色" "Square root" = "平方根" +Start = "開始" "Start with Windows" = "Windows と同時に開始" -"Start" = "開始" -"Stretch" = "Stretch" -"Subtract" = "減算" -"System default" = "システム既定" +Stretch = "Stretch" +Subtract = "減算" "System Tray" = "System Tray" +"System default" = "システム既定" "Target layer id" = "Target layer id" -"Taskbar" = "Taskbar" +Taskbar = "Taskbar" "Template is valid" = "テンプレートは有効です" +Text = "テキスト" "Text items are informational and cannot be clicked." = "Text items are informational and cannot be clicked." -"Text" = "テキスト" "The dashboard could not initialize" = "ダッシュボードを初期化できませんでした" "The menu was saved, but its old file could not be removed" = "The menu was saved, but its old file could not be removed" "The monitor is running, but its dashboard request channel was not found" = "The monitor is running, but its dashboard request channel was not found" "The theme could not be activated" = "The theme could not be activated" "The theme was saved, but it could not be activated" = "The theme was saved, but it could not be activated" "The widget is managed in Theme Studio" = "ウィジェットはテーマスタジオで管理します" +Theme = "テーマ" +"Theme Studio" = "テーマスタジオ" +"Theme Studio packages" = "テーマスタジオパッケージ" +"Theme Studio packages and themes" = "テーマスタジオのパッケージとテーマ" "Theme editor" = "テーマエディター" "Theme files" = "テーマファイル" "Theme name" = "テーマ名" "Theme packages" = "テーマパッケージ" -"Theme Studio packages and themes" = "テーマスタジオのパッケージとテーマ" -"Theme Studio packages" = "テーマスタジオパッケージ" -"Theme Studio" = "テーマスタジオ" -"Theme" = "テーマ" "This asset is still used by a theme" = "This asset is still used by a theme" "This asset is used by a saved theme or the current theme" = "This asset is used by a saved theme or the current theme" "This item is read-only" = "This item is read-only" "This permanently removes the copied image file." = "This permanently removes the copied image file." "To show a literal opening brace, type:" = "開始波括弧をそのまま表示するには、次を入力します:" +"Toggle Start with Windows" = "Windowsと同時起動を切り替え" "Toggle currently supports Render only" = "切り替えは現在レンダーのみ対応しています" "Toggle dashboard" = "ダッシュボードを切り替え" "Toggle layer Render" = "レイヤーのレンダーを切り替え" "Toggle property" = "プロパティを切り替え" "Toggle provider" = "プロバイダーを切り替え" -"Toggle Start with Windows" = "Windowsと同時起動を切り替え" "Top to bottom" = "Top to bottom" -"Track" = "トラック" +Track = "トラック" "Tray Icon" = "Tray Icon" -"True" = "真" +True = "真" +"Turn off to use Segoe UI for widget text" = "オフにするとウィジェットのテキストに Segoe UI を使用します" "Two decimals" = "小数第2位" "Type ordinary words directly in the editor." = "通常の文字はエディターに直接入力します。" "Type text here, then insert provider values below..." = "ここにテキストを入力し、下からプロバイダー値を挿入します..." "Type to filter fonts" = "入力してフォントを絞り込む" +URL = "URL" "Unable to create the dashboard instance guard" = "Unable to create the dashboard instance guard" "Unable to export theme package" = "テーマパッケージをエクスポートできません" "Unable to import theme" = "テーマをインポートできません" @@ -423,41 +423,45 @@ copilot_window_title = "Copilot 使用量モニター" "Unable to save theme" = "Unable to save theme" "Unable to signal the running monitor" = "Unable to signal the running monitor" "Unable to start the dashboard" = "ダッシュボードを起動できません" +Undo = "元に戻す" "Undo the last theme change (Ctrl+Z)" = "Undo the last theme change (Ctrl+Z)" -"Undo" = "元に戻す" "Unsaved changes" = "未保存の変更" "Unsaved theme changes will otherwise be lost." = "保存していないテーマの変更は失われます。" "Untitled theme" = "Untitled theme" "Update frequency" = "更新間隔" -"URL" = "URL" "Usage and reset" = "使用量とリセット" "Usage direction" = "使用量の表示方向" "Usage only" = "使用量のみ" -"Use asset" = "アセットを使用" "Use Builder" = "ビルダーを使う" +"Use Windows default font" = "Windows の既定のフォントを使用" +"Use asset" = "アセットを使用" "Use the mouse wheel over the canvas to zoom" = "Use the mouse wheel over the canvas to zoom" -"Used" = "Used" +Used = "Used" "Uses the same safe action language as layer mouse events." = "Uses the same safe action language as layer mouse events." "Valid actions" = "有効なアクション" "Valid expression" = "有効な式" +Value = "値" "Value expression" = "値の式" -"Value" = "値" "Values are inserted at the end of the current text and can be moved or edited afterwards." = "値は現在のテキストの末尾に挿入され、後から移動または編集できます。" -"Variables" = "変数" -"Visibility" = "表示率" +Variables = "変数" +Visibility = "表示率" "Weekly remaining" = "週間残量" "Weekly reset" = "週間リセット" "Weekly shown" = "週間表示値" "Weekly summary" = "週間概要" "Weekly used" = "週間使用量" "Weekly window label" = "週間期間ラベル" -"Weight" = "太さ" +Weight = "太さ" "Whole number" = "整数" -"Width" = "幅" +Width = "幅" +X = "X" "X offset" = "X オフセット" -"X" = "X" +Y = "Y" "Y offset" = "Y オフセット" -"Y" = "Y" -"Lock in taskbar" = "Lock in taskbar" -"Keep the widget docked; never float automatically" = "Keep the widget docked; never float automatically" -"Locked" = "Locked" +actions = "アクション" +"built-in" = "組み込み" +copy = "copy" +"e.g. false, 120, parent.width / 2" = "例: false、120、parent.width / 2" +"has been changed, what would you like to do?" = "が変更されました。どうしますか?" +"rendered as" = "rendered as" +"ƒx Values" = "ƒx Values" diff --git a/src/localization/locales/ko.toml b/src/localization/locales/ko.toml index 03f641dc..2241a55a 100644 --- a/src/localization/locales/ko.toml +++ b/src/localization/locales/ko.toml @@ -67,6 +67,10 @@ opencode_window_title = "OpenCode 사용량 모니터" cursor_window_title = "Cursor 사용량 모니터" grok_window_title = "Grok 사용량 모니터" copilot_window_title = "Copilot 사용량 모니터" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral 인증 오류" +mistral_token_expired_body = "MISTRAL_API_KEY 환경 변수를 설정하거나 공식 Vibe CLI에 로그인하여 ~/.vibe/.env에 MISTRAL_API_KEY가 포함되도록 하세요. 그런 다음 이 앱을 새로 고치거나 다시 시작하세요." +mistral_window_title = "Mistral 사용량 모니터" [translations] "Use Windows default font" = "Windows 기본 글꼴 사용" diff --git a/src/localization/locales/nl.toml b/src/localization/locales/nl.toml index 0b049a1f..82e7a29b 100644 --- a/src/localization/locales/nl.toml +++ b/src/localization/locales/nl.toml @@ -65,6 +65,10 @@ opencode_window_title = "OpenCode-gebruiksmonitor" cursor_window_title = "Cursor-gebruiksmonitor" grok_window_title = "Grok-gebruiksmonitor" copilot_window_title = "Copilot-gebruiksmonitor" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral-authenticatiefout" +mistral_token_expired_body = "Stel de MISTRAL_API_KEY-omgevingsvariabele in, of meld je aan met de officiële Vibe CLI zodat ~/.vibe/.env MISTRAL_API_KEY bevat. Ververs of herstart de app daarna." +mistral_window_title = "Mistral-gebruiksmonitor" [translations] "Use Windows default font" = "Standaardlettertype van Windows gebruiken" diff --git a/src/localization/locales/pl.toml b/src/localization/locales/pl.toml index 9195b267..a574f9f1 100644 --- a/src/localization/locales/pl.toml +++ b/src/localization/locales/pl.toml @@ -65,6 +65,10 @@ opencode_window_title = "Monitor zużycia OpenCode" cursor_window_title = "Monitor zużycia Cursor" grok_window_title = "Monitor zużycia Grok" copilot_window_title = "Monitor zużycia Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Błąd uwierzytelniania Mistral" +mistral_token_expired_body = "Ustaw zmienną środowiskową MISTRAL_API_KEY lub zaloguj się przez oficjalną aplikację Vibe CLI, aby plik ~/.vibe/.env zawierał MISTRAL_API_KEY. Następnie odśwież lub uruchom aplikację ponownie." +mistral_window_title = "Monitor zużycia Mistral" [translations] "Use Windows default font" = "Używaj domyślnej czcionki systemu Windows" diff --git a/src/localization/locales/pt-BR.toml b/src/localization/locales/pt-BR.toml index f372f908..13a00720 100644 --- a/src/localization/locales/pt-BR.toml +++ b/src/localization/locales/pt-BR.toml @@ -65,6 +65,10 @@ opencode_window_title = "Monitor de uso do OpenCode" cursor_window_title = "Monitor de uso do Cursor" grok_window_title = "Monitor de uso do Grok" copilot_window_title = "Monitor de uso do Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Erro de Autenticação do Mistral" +mistral_token_expired_body = "Defina a variável de ambiente MISTRAL_API_KEY ou faça login com a CLI oficial do Vibe para que ~/.vibe/.env contenha MISTRAL_API_KEY. Depois disso, atualize ou reinicie este aplicativo." +mistral_window_title = "Monitor de uso do Mistral" [translations] "Use Windows default font" = "Usar a fonte padrão do Windows" diff --git a/src/localization/locales/ru.toml b/src/localization/locales/ru.toml index 977e961a..d69a8646 100644 --- a/src/localization/locales/ru.toml +++ b/src/localization/locales/ru.toml @@ -65,6 +65,10 @@ opencode_window_title = "Монитор использования OpenCode" cursor_window_title = "Монитор использования Cursor" grok_window_title = "Монитор использования Grok" copilot_window_title = "Монитор использования Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Ошибка авторизации Mistral" +mistral_token_expired_body = "Задайте переменную окружения MISTRAL_API_KEY или войдите через официальный Vibe CLI, чтобы ~/.vibe/.env содержал MISTRAL_API_KEY. После этого обновите или перезапустите приложение." +mistral_window_title = "Монитор использования Mistral" [translations] "Use Windows default font" = "Использовать шрифт Windows по умолчанию" diff --git a/src/localization/locales/th.toml b/src/localization/locales/th.toml index 1de09c42..0e5e8b83 100644 --- a/src/localization/locales/th.toml +++ b/src/localization/locales/th.toml @@ -67,6 +67,10 @@ opencode_window_title = "ตัวติดตามการใช้งาน cursor_window_title = "ตัวติดตามการใช้งาน Cursor" grok_window_title = "ตัวติดตามการใช้งาน Grok" copilot_window_title = "ตัวติดตามการใช้งาน Copilot" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral ยืนยันตัวตนไม่สำเร็จ" +mistral_token_expired_body = "ตั้งค่า MISTRAL_API_KEY ในตัวแปรสภาพแวดล้อม หรือลงชื่อเข้าใช้ด้วย Vibe CLI อย่างเป็นทางการเพื่อให้ ~/.vibe/.env มี MISTRAL_API_KEY จากนั้นให้รีเฟรชหรือเปิดแอปนี้ใหม่" +mistral_window_title = "ตัวติดตามการใช้งาน Mistral" [translations] "Use Windows default font" = "ใช้แบบอักษรเริ่มต้นของ Windows" diff --git a/src/localization/locales/tr.toml b/src/localization/locales/tr.toml index 6dc7044f..f6c05a78 100644 --- a/src/localization/locales/tr.toml +++ b/src/localization/locales/tr.toml @@ -65,6 +65,10 @@ opencode_window_title = "OpenCode Kullanım İzleyicisi" cursor_window_title = "Cursor Kullanım İzleyicisi" grok_window_title = "Grok Kullanım İzleyicisi" copilot_window_title = "Copilot Kullanım İzleyicisi" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral Kimlik Doğrulama Hatası" +mistral_token_expired_body = "MISTRAL_API_KEY ortam değişkenini ayarlayın veya resmi Vibe CLI ile oturum açın, böylece ~/.vibe/.env MISTRAL_API_KEY içersin. Ardından uygulamayı yenileyin veya yeniden başlatın." +mistral_window_title = "Mistral Kullanım İzleyicisi" [translations] "Use Windows default font" = "Windows varsayılan yazı tipini kullan" diff --git a/src/localization/locales/zh-CN.toml b/src/localization/locales/zh-CN.toml index d7fc3421..5c6f12be 100644 --- a/src/localization/locales/zh-CN.toml +++ b/src/localization/locales/zh-CN.toml @@ -67,6 +67,10 @@ opencode_window_title = "OpenCode Usage Monitor" cursor_window_title = "Cursor 使用量监控" grok_window_title = "Grok 使用量监控" copilot_window_title = "Copilot 使用量监控" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral 验证错误" +mistral_token_expired_body = "设置 MISTRAL_API_KEY 环境变量,或使用官方 Vibe CLI 登录,以便 ~/.vibe/.env 包含 MISTRAL_API_KEY。完成后,请刷新或重新启动此应用程序。" +mistral_window_title = "Mistral 使用量监控" [translations] "Use Windows default font" = "使用 Windows 默认字体" diff --git a/src/localization/locales/zh-TW.toml b/src/localization/locales/zh-TW.toml index 0c6eb84a..a0d174af 100644 --- a/src/localization/locales/zh-TW.toml +++ b/src/localization/locales/zh-TW.toml @@ -67,6 +67,10 @@ opencode_window_title = "OpenCode 使用量監控" cursor_window_title = "Cursor 使用量監控" grok_window_title = "Grok 使用量監控" copilot_window_title = "Copilot 使用量監控" +mistral_model = "Mistral" +mistral_token_expired_title = "Mistral 驗證錯誤" +mistral_token_expired_body = "設定 MISTRAL_API_KEY 環境變數,或使用官方 Vibe CLI 登入,以便 ~/.vibe/.env 包含 MISTRAL_API_KEY。完成後,請重新整理或重新啟動此應用程式。" +mistral_window_title = "Mistral 使用量監控" [translations] "Use Windows default font" = "使用 Windows 預設字型" diff --git a/src/localization/mod.rs b/src/localization/mod.rs index bd23eab4..b395d4ff 100644 --- a/src/localization/mod.rs +++ b/src/localization/mod.rs @@ -100,6 +100,10 @@ impl LanguageId { strings.copilot_token_expired_title, strings.copilot_token_expired_body, ), + ProviderId::Mistral => ( + strings.mistral_token_expired_title, + strings.mistral_token_expired_body, + ), } } @@ -149,6 +153,10 @@ pub struct Strings { pub cursor_model: &'static str, pub grok_model: &'static str, pub copilot_model: &'static str, + pub mistral_model: &'static str, + pub mistral_token_expired_title: &'static str, + pub mistral_token_expired_body: &'static str, + pub mistral_window_title: &'static str, pub settings: &'static str, pub start_with_windows: &'static str, pub language: &'static str, diff --git a/src/poller.rs b/src/poller.rs index 996b94e2..8b5c9059 100644 --- a/src/poller.rs +++ b/src/poller.rs @@ -286,6 +286,7 @@ mod codex; mod copilot; mod cursor; mod grok; +mod mistral; mod opencode; mod retry_after; mod windows_credentials; @@ -298,7 +299,7 @@ struct ProviderPoller { credential_watch: fn(bool) -> CredentialWatchSnapshot, } -const PROVIDER_POLLERS: [ProviderPoller; 7] = [ +const PROVIDER_POLLERS: [ProviderPoller; 8] = [ ProviderPoller { id: ProviderId::Claude, poll: claude::poll_claude_code, @@ -334,6 +335,11 @@ const PROVIDER_POLLERS: [ProviderPoller; 7] = [ poll: copilot::poll_copilot, credential_watch: copilot::credential_watch_snapshot, }, + ProviderPoller { + id: ProviderId::Mistral, + poll: mistral::poll_mistral, + credential_watch: mistral::credential_watch_snapshot, + }, ]; fn provider_poller(provider: ProviderId) -> Option<&'static ProviderPoller> { diff --git a/src/poller/mistral.rs b/src/poller/mistral.rs new file mode 100644 index 00000000..48712296 --- /dev/null +++ b/src/poller/mistral.rs @@ -0,0 +1,398 @@ +use std::collections::hash_map::DefaultHasher; +use std::hash::{Hash, Hasher}; +use std::path::Path; +use std::time::UNIX_EPOCH; + +use serde::Deserialize; + +use super::{build_agent, parse_iso8601, PollError}; +use crate::diagnose; +use crate::models::{UsageData, UsageSection}; +use super::windows_credentials; + +const BUDGET_URL: &str = "https://api.mistral.ai/v1/billing/budget"; +const TOKEN_ENVIRONMENT: &str = "MISTRAL_API_KEY"; +const VIBE_HOME_ENV: &str = "VIBE_HOME"; +const USERPROFILE_ENV: &str = "USERPROFILE"; +const VIBE_ENV_FILE: &str = ".vibe/.env"; +const USER_AGENT: &str = concat!(env!("CARGO_PKG_NAME"), "/", env!("CARGO_PKG_VERSION")); +const VIBE_KEYRING_TARGETS: [&str; 2] = ["ai.mistral.vibe", "MISTRAL_API_KEY@ai.mistral.vibe"]; + +#[derive(Debug, Deserialize)] +struct BudgetResponse { + #[serde(default)] + vibe_budget: Option, + #[serde(default)] + api_budget: Option, +} + +#[derive(Debug, Deserialize)] +struct Budget { + #[serde(default)] + usage_percentage: f64, + #[serde(default)] + #[allow(dead_code)] + initial_budget: f64, + #[serde(default)] + #[allow(dead_code)] + currency: Option, + #[serde(default)] + reset_at: Option, + #[serde(default)] + #[allow(dead_code)] + payg_enabled: Option, +} + +pub(super) fn poll_mistral() -> Result { + let token = resolve_token().ok_or_else(|| { + diagnose::log( + "Mistral usage poll failed: no credentials found; set MISTRAL_API_KEY or create ~/.vibe/.env with MISTRAL_API_KEY=...", + ); + PollError::NoCredentials + })?; + + fetch_mistral_usage(&token) +} + +pub(super) fn credential_watch_snapshot(_all_sources: bool) -> Vec { + let mut parts = Vec::new(); + + // Environment variable presence/value hash + match std::env::var(TOKEN_ENVIRONMENT) { + Ok(value) => { + let mut hasher = DefaultHasher::new(); + value.hash(&mut hasher); + parts.push(format!( + "{}|present|{}|{:x}", + TOKEN_ENVIRONMENT, + value.len(), + hasher.finish() + )); + } + Err(_) => parts.push(format!("{}|missing", TOKEN_ENVIRONMENT)), + } + + // Vibe CLI .env file signature + if let Some(env_path) = vibe_env_path() { + parts.push(env_file_signature(&env_path)); + } else { + parts.push("vibe-env|missing".to_string()); + } + + // Windows Credential Manager signatures + let mut has_keyring = false; + for target in VIBE_KEYRING_TARGETS { + let credentials = windows_credentials::enumerate_generic(target); + if !credentials.is_empty() { + for cred in credentials { + parts.push(format!("keyring|{}|{}", cred.target, cred.last_written)); + has_keyring = true; + } + } + } + if !has_keyring { + parts.push("keyring|missing".to_string()); + } + + parts +} + +fn resolve_token() -> Option { + // Try environment variable first + if let Ok(token) = std::env::var(TOKEN_ENVIRONMENT) { + let token = token.trim(); + if !token.is_empty() { + return Some(token.to_string()); + } + } + + // Try Vibe CLI .env file + if let Some(env_path) = vibe_env_path() { + if let Ok(content) = std::fs::read_to_string(env_path) { + for line in content.lines() { + let line = line.trim(); + // Skip comments and blank lines + if line.is_empty() || line.starts_with('#') { + continue; + } + // Parse key=value + if let Some((key, value)) = line.split_once('=') { + let key = key.trim(); + if key == TOKEN_ENVIRONMENT { + let value = value.trim(); + // Remove surrounding quotes if present + let value = value.strip_prefix('"').and_then(|v| v.strip_suffix('"')) + .or_else(|| value.strip_prefix('\'').and_then(|v| v.strip_suffix('\''))) + .unwrap_or(value); + if !value.is_empty() { + return Some(value.to_string()); + } + } + } + } + } + } + + // Try Windows Credential Manager + for target in VIBE_KEYRING_TARGETS { + if let Some(secret) = windows_credentials::read_generic(target) { + let secret = secret.trim(); + if !secret.is_empty() { + return Some(secret.to_string()); + } + } + } + + None +} + +fn vibe_env_path() -> Option { + // Try VIBE_HOME first + if let Ok(vibe_home) = std::env::var(VIBE_HOME_ENV) { + let path = Path::new(&vibe_home).join(VIBE_ENV_FILE); + if path.exists() { + return Some(path.to_string_lossy().into_owned()); + } + } + + // Fall back to USERPROFILE + if let Ok(userprofile) = std::env::var(USERPROFILE_ENV) { + let path = Path::new(&userprofile).join(VIBE_ENV_FILE); + if path.exists() { + return Some(path.to_string_lossy().into_owned()); + } + } + + None +} + +fn env_file_signature(path: &str) -> String { + match std::fs::metadata(path) { + Ok(metadata) => { + let mut hasher = DefaultHasher::new(); + // Hash the path to make signature unique to the file location + path.hash(&mut hasher); + let modified = metadata + .modified() + .ok() + .and_then(|value| value.duration_since(UNIX_EPOCH).ok()) + .map(|value| value.as_secs()) + .unwrap_or(0); + format!( + "vibe-env|present|{}|{}|{}", + path, + metadata.len(), + modified + ) + } + Err(_) => format!("vibe-env|{}|missing", path), + } +} + +fn fetch_mistral_usage(token: &str) -> Result { + let agent = build_agent()?; + + let request = agent + .get(BUDGET_URL) + .header("Authorization", &format!("Bearer {token}")) + .header("x-api-key", token) + .header("Accept", "application/json") + .header("User-Agent", USER_AGENT); + + let response = match request.call().and_then(super::check_http_status) { + Ok(response) => response, + Err(ureq::Error::StatusCode(401 | 403)) => return Err(PollError::AuthRequired), + Err(ureq::Error::StatusCode(code)) => { + diagnose::log(format!("Mistral usage endpoint returned status {code}")); + return Err(PollError::HttpStatus(code)); + } + Err(error) => { + diagnose::log_error("Mistral usage request failed", error); + return Err(PollError::NetworkError); + } + }; + + let response: BudgetResponse = response + .into_body() + .read_json() + .map_err(|error| { + diagnose::log_error("unable to parse Mistral usage response", error); + PollError::UnexpectedResponse + })?; + + map_to_usage_data(response) +} + +fn map_to_usage_data(response: BudgetResponse) -> Result { + // If both budgets are None, fail + if response.vibe_budget.is_none() && response.api_budget.is_none() { + diagnose::log("Mistral usage response missing both vibe_budget and api_budget"); + return Err(PollError::RequestFailed); + } + + let mut usage_data = UsageData::default(); + + // Map vibe_budget to weekly + if let Some(budget) = response.vibe_budget { + let percentage = budget.usage_percentage.clamp(0.0, 100.0); + let resets_at = parse_iso8601(budget.reset_at.as_deref()); + + usage_data.weekly = UsageSection { + available: true, + percentage, + resets_at, + }; + usage_data.weekly_label = Some("Vibe".to_string()); + } + + // Map api_budget to monthly + if let Some(budget) = response.api_budget { + let percentage = budget.usage_percentage.clamp(0.0, 100.0); + let resets_at = parse_iso8601(budget.reset_at.as_deref()); + + usage_data.monthly = Some(UsageSection { + available: true, + percentage, + resets_at, + }); + } + + Ok(usage_data) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn usage(json: serde_json::Value) -> Result { + map_to_usage_data(serde_json::from_value(json).unwrap()) + } + + #[test] + fn both_budgets_present() { + let data = usage(serde_json::json!({ + "vibe_budget": { + "usage_percentage": 25.5, + "initial_budget": 1000.0, + "currency": "credits", + "reset_at": "2026-11-01T00:00:00Z", + "payg_enabled": false + }, + "api_budget": { + "usage_percentage": 45.2, + "initial_budget": 2000.0, + "currency": "USD", + "reset_at": "2026-11-01T00:00:00Z", + "payg_enabled": false + } + })).unwrap(); + + assert!(data.weekly.available); + assert_eq!(data.weekly.percentage, 25.5); + assert_eq!(data.weekly_label.as_deref(), Some("Vibe")); + assert!(data.monthly.is_some()); + assert_eq!(data.monthly.unwrap().percentage, 45.2); + } + + #[test] + fn only_vibe_budget() { + let data = usage(serde_json::json!({ + "vibe_budget": { + "usage_percentage": 30.0, + "initial_budget": 1000.0, + "reset_at": "2026-11-01T00:00:00Z" + } + })).unwrap(); + + assert!(data.weekly.available); + assert_eq!(data.weekly.percentage, 30.0); + assert_eq!(data.weekly_label.as_deref(), Some("Vibe")); + assert!(data.monthly.is_none()); + } + + #[test] + fn only_api_budget() { + let data = usage(serde_json::json!({ + "api_budget": { + "usage_percentage": 60.0, + "initial_budget": 2000.0, + "reset_at": "2026-11-01T00:00:00Z" + } + })).unwrap(); + + assert!(!data.weekly.available); + assert!(data.monthly.is_some()); + assert_eq!(data.monthly.unwrap().percentage, 60.0); + } + + #[test] + fn both_budgets_missing() { + let result = usage(serde_json::json!({})); + assert!(matches!(result, Err(PollError::RequestFailed))); + } + + #[test] + fn percentage_clamped() { + let data = usage(serde_json::json!({ + "vibe_budget": { + "usage_percentage": 150.0, + "initial_budget": 100.0, + "reset_at": "2026-11-01T00:00:00Z" + } + })).unwrap(); + + assert_eq!(data.weekly.percentage, 100.0); + } + + #[test] + fn env_file_parsing() { + let content = r#"# This is a comment +MISTRAL_API_KEY=test_key_123 +# Another comment + MISTRAL_API_KEY="quoted_key" +ANOTHER_VAR=value +"#; + + let temp_dir = tempfile::tempdir().unwrap(); + let env_path = temp_dir.path().join(".vibe").join(".env"); + std::fs::create_dir_all(env_path.parent().unwrap()).unwrap(); + std::fs::write(&env_path, content).unwrap(); + + // Temporarily set VIBE_HOME + std::env::set_var(VIBE_HOME_ENV, temp_dir.path().to_string_lossy().into_owned()); + + let token = resolve_token(); + assert_eq!(token, Some("test_key_123".to_string())); + + std::env::remove_var(VIBE_HOME_ENV); + } + + #[test] + fn keyring_fallback_when_env_and_file_missing() { + // Remove env var and ensure no .env file + std::env::remove_var(TOKEN_ENVIRONMENT); + std::env::remove_var(VIBE_HOME_ENV); + std::env::remove_var(USERPROFILE_ENV); + + // This test just verifies resolve_token doesn't panic when keyring is the only source + // On a machine with keyring entries, it will return Some(secret) + // On a machine without, it returns None + let token = resolve_token(); + // Should not panic, just return None if nothing is available + assert!(token.is_none() || token.is_some()); + } + + #[test] + fn credential_watch_snapshot_covers_all_sources() { + // Test that env var, file, and keyring signatures are included + let snapshot = credential_watch_snapshot(false); + assert!(!snapshot.is_empty()); + + // Should have at least env var signature + assert!(snapshot.iter().any(|s| s.contains(TOKEN_ENVIRONMENT))); + // Should have vibe-env signature + assert!(snapshot.iter().any(|s| s.starts_with("vibe-env|"))); + // Should have keyring signature + assert!(snapshot.iter().any(|s| s.starts_with("keyring|"))); + } +} diff --git a/src/poller/tests.rs b/src/poller/tests.rs index a9665996..0f1fc631 100644 --- a/src/poller/tests.rs +++ b/src/poller/tests.rs @@ -139,6 +139,7 @@ fn claude_failure_does_not_block_codex_when_both_are_enabled() { ProviderId::Cursor => unreachable!("Cursor is disabled"), ProviderId::Grok => unreachable!("Grok is disabled"), ProviderId::Copilot => unreachable!("Copilot is disabled"), + ProviderId::Mistral => unreachable!("Mistral is disabled"), }, ) .expect("codex data should keep the poll successful"); @@ -162,6 +163,7 @@ fn codex_failure_does_not_block_claude_when_both_are_enabled() { ProviderId::Cursor => unreachable!("Cursor is disabled"), ProviderId::Grok => unreachable!("Grok is disabled"), ProviderId::Copilot => unreachable!("Copilot is disabled"), + ProviderId::Mistral => unreachable!("Mistral is disabled"), }, ) .expect("claude data should keep the poll successful"); @@ -185,6 +187,7 @@ fn returns_first_error_when_no_enabled_provider_succeeds() { ProviderId::Cursor => Err(PollError::NoCredentials), ProviderId::Grok => Err(PollError::NoCredentials), ProviderId::Copilot => Err(PollError::NoCredentials), + ProviderId::Mistral => Err(PollError::NoCredentials), }, ) .expect_err("all-provider failure should return an error"); @@ -305,6 +308,7 @@ fn antigravity_failure_does_not_block_codex_when_both_are_enabled() { ProviderId::Cursor => unreachable!("Cursor is disabled"), ProviderId::Grok => unreachable!("Grok is disabled"), ProviderId::Copilot => unreachable!("Copilot is disabled"), + ProviderId::Mistral => unreachable!("Mistral is disabled"), }, ) .expect("codex data should keep the poll successful"); @@ -328,6 +332,7 @@ fn opencode_failure_does_not_block_codex_when_both_are_enabled() { ProviderId::Cursor => unreachable!("Cursor is disabled"), ProviderId::Grok => unreachable!("Grok is disabled"), ProviderId::Copilot => unreachable!("Copilot is disabled"), + ProviderId::Mistral => unreachable!("Mistral is disabled"), }, ) .expect("Codex data should keep the poll successful"); diff --git a/src/providers.rs b/src/providers.rs index aa685b6b..b402ac90 100644 --- a/src/providers.rs +++ b/src/providers.rs @@ -16,6 +16,7 @@ pub enum ProviderId { Cursor = 4, Grok = 5, Copilot = 6, + Mistral = 7, } #[derive(Clone, Copy, Debug, PartialEq, Eq)] @@ -34,7 +35,7 @@ pub struct ProviderDescriptor { pub default_enabled: bool, } -pub const PROVIDER_DESCRIPTORS: [ProviderDescriptor; 7] = [ +pub const PROVIDER_DESCRIPTORS: [ProviderDescriptor; 8] = [ ProviderDescriptor { id: ProviderId::Claude, key: "claude", @@ -98,10 +99,19 @@ pub const PROVIDER_DESCRIPTORS: [ProviderDescriptor; 7] = [ native_menu_command_id: 66, default_enabled: false, }, + ProviderDescriptor { + id: ProviderId::Mistral, + key: "mistral", + cache_key: "mistral", + display_name: "Mistral", + settings_description: "Collect Vibe Code and API usage from Mistral", + native_menu_command_id: 67, + default_enabled: false, + }, ]; impl ProviderId { - pub const ALL: [Self; 7] = [ + pub const ALL: [Self; 8] = [ Self::Claude, Self::Codex, Self::Antigravity, @@ -109,6 +119,7 @@ impl ProviderId { Self::Cursor, Self::Grok, Self::Copilot, + Self::Mistral, ]; pub const fn descriptor(self) -> &'static ProviderDescriptor { diff --git a/src/studio_app/studio_helper_panels.rs b/src/studio_app/studio_helper_panels.rs index a105e2f8..871f4efb 100644 --- a/src/studio_app/studio_helper_panels.rs +++ b/src/studio_app/studio_helper_panels.rs @@ -586,6 +586,66 @@ pub(super) const TEXT_TEMPLATE_VALUES: &[TextTemplateValue] = &[ expression: "copilot.weekly.reset.seconds", kind: TextTemplateValueKind::Duration, }, + TextTemplateValue { + group: "Mistral", + label: "Vibe summary", + expression: "mistral.weekly", + kind: TextTemplateValueKind::UsageSummary, + }, + TextTemplateValue { + group: "Mistral", + label: "Vibe used", + expression: "mistral.weekly.percentage", + kind: TextTemplateValueKind::Percentage, + }, + TextTemplateValue { + group: "Mistral", + label: "Vibe remaining", + expression: "mistral.weekly.remaining", + kind: TextTemplateValueKind::Percentage, + }, + TextTemplateValue { + group: "Mistral", + label: "Vibe shown", + expression: "mistral.weekly.display", + kind: TextTemplateValueKind::DisplayPercentage, + }, + TextTemplateValue { + group: "Mistral", + label: "Vibe reset", + expression: "mistral.weekly.reset.seconds", + kind: TextTemplateValueKind::Duration, + }, + TextTemplateValue { + group: "Mistral", + label: "API summary", + expression: "mistral.monthly", + kind: TextTemplateValueKind::UsageSummary, + }, + TextTemplateValue { + group: "Mistral", + label: "API used", + expression: "mistral.monthly.percentage", + kind: TextTemplateValueKind::Percentage, + }, + TextTemplateValue { + group: "Mistral", + label: "API remaining", + expression: "mistral.monthly.remaining", + kind: TextTemplateValueKind::Percentage, + }, + TextTemplateValue { + group: "Mistral", + label: "API shown", + expression: "mistral.monthly.display", + kind: TextTemplateValueKind::DisplayPercentage, + }, + TextTemplateValue { + group: "Mistral", + label: "API reset", + expression: "mistral.monthly.reset.seconds", + kind: TextTemplateValueKind::Duration, + }, TextTemplateValue { group: "Labels", label: "Session window label", diff --git a/src/theme_engine/tests.rs b/src/theme_engine/tests.rs index 73e7c38d..3d4b78ef 100644 --- a/src/theme_engine/tests.rs +++ b/src/theme_engine/tests.rs @@ -1085,14 +1085,16 @@ fn starter_theme_round_trips_and_validates() { }) .collect::>(); // Classic contains separate light and dark progress layers so the - // 1.4.9 palette follows the taskbar mode without runtime recolouring: - // five providers over two windows in two modes, plus Grok and Copilot, - // which fill only the long-window row, plus a credit overlay on that row - // for the three providers that report credits, plus the two eight-segment - // Fable layers. + // 1.4.9 palette follows the taskbar mode without runtime recolouring. + // In document order: five providers over two windows in two modes + // (20), Grok and Copilot long-window rows (2×2), credit overlays on + // that row for the three providers that report credits (3×2), the + // two eight-segment Fable layers (2), then Mistral's API monthly + // bar and Vibe long-window pool in dark and light (2×2) — Mistral's + // segments come last in document order, after the Fable layers. assert_eq!( segments, - [vec![10; 5 * 2 * 2 + 2 * 2 + 3 * 2], vec![8; 2]].concat() + [vec![10; 5 * 2 * 2 + 2 * 2 + 3 * 2], vec![8; 2], vec![10; 2 * 2]].concat() ); assert!(theme.surfaces[0] .children @@ -2131,7 +2133,10 @@ fn starter_adapts_width_segments_and_collapsed_provider_rows() { ), ( ThemeRuntime::from_providers(ProviderSet::from_enabled(ProviderId::ALL)), - 725, + // 8 providers: 42 + 8 * (2*11 - 1 + 4 + 62) + 7 * 3 + (1 + 1) * 28 + // (Mistral joins the row after Copilot; the Fable column is empty + // without usage data, so its 93-point term is zero). + 815, 2, ), ] { @@ -2207,7 +2212,7 @@ fn starter_has_a_taskbar_widget_and_provider_tray_icons() { theme.surfaces[0].placement.reference.region, ReferenceRegion::SystemTray ); - assert_eq!(theme.surfaces.len(), 8); + assert_eq!(theme.surfaces.len(), 9); assert!(theme.surfaces[1..] .iter() .all(|surface| surface.placement.nest == SurfaceNest::TrayIcon)); @@ -2328,6 +2333,10 @@ fn classic_vertical_stacks_enabled_providers_and_preserves_tray_roots() { let width = (host_width - 2).min(62); let provider_height = |provider| match provider { ProviderId::Grok | ProviderId::Copilot => 42, + // Mistral reports Vibe + API windows, so it keeps the full row, + // matching classic-vertical.json, whose height expression + // discounts only grok/copilot by 22 points. + ProviderId::Mistral => 64, _ => 64, }; let height = providers.iter().map(provider_height).sum(); @@ -2459,6 +2468,7 @@ fn compact_fluent_quad_widget_respects_usage_direction() { UsageData { session: section.clone(), weekly: section.clone(), + monthly: Some(section.clone()), limits: (provider == ProviderId::Claude) .then(|| UsageLimit { key: "weekly_scoped_fable".into(), diff --git a/src/theme_engine/theme_expression.rs b/src/theme_engine/theme_expression.rs index 21fb22f9..ad0e5a2e 100644 --- a/src/theme_engine/theme_expression.rs +++ b/src/theme_engine/theme_expression.rs @@ -523,6 +523,7 @@ pub(super) fn format_usage_line(base: &str, context: &DataContext) -> Option= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#FF4A00FF" + } + }, + "corner_radius": "3" + }, + { + "id": "mistral-tray-low-fill", + "name": "Mistral normal red fill", + "render": "mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FF4A00FF" + } + }, + "corner_radius": "1" + }, + { + "id": "mistral-tray-high-fill", + "name": "Mistral high-usage white fill", + "render": "mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF" + } + }, + "corner_radius": "1" + }, + { + "id": "mistral-tray-placeholder", + "name": "Mistral loading placeholder", + "render": "data.poll_ok == 0 || mistral.available == 0", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "Mi", + "font_family": "Arial Bold", + "font_size": "34", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-one-digit", + "name": "Mistral normal one-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display < 9.5 && mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-two-digits", + "name": "Mistral normal two-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 9.5 && mistral.headline.display < 99.5 && mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-three-digits", + "name": "Mistral normal three-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 99.5 && mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-high-one-digit", + "name": "Mistral high-usage one-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display < 9.5 && mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + }, + { + "id": "mistral-tray-high-two-digits", + "name": "Mistral high-usage two-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 9.5 && mistral.headline.display < 99.5 && mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + }, + { + "id": "mistral-tray-high-three-digits", + "name": "Mistral high-usage three-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 99.5 && mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + } + ] } ] } diff --git a/src/themes/classic-vertical.json b/src/themes/classic-vertical.json index 97af21ee..bd33ecc7 100644 --- a/src/themes/classic-vertical.json +++ b/src/themes/classic-vertical.json @@ -1225,6 +1225,196 @@ }, "corner_radius": "1" } + }, + { + "id": "mistral-provider", + "name": "Mistral", + "parent": "provider-column", + "render": "providers.mistral.enabled", + "width": "canvas.width", + "height": "64" + }, + { + "id": "mistral-title", + "name": "mistral-title", + "parent": "mistral-provider", + "render": "system.dark", + "x": "2", + "y": "2", + "width": "max(1, canvas.width - 4)", + "height": "14", + "content": { + "type": "text", + "template": "Mistral", + "font_family": "Segoe UI", + "font_size": "min(10, (canvas.width - 4) / 5.5)", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "center", + "color": { + "color": "#FF4A00" + } + } + }, + { + "id": "mistral-title-light", + "name": "mistral-title-light", + "parent": "mistral-provider", + "render": "1 - system.dark", + "x": "2", + "y": "2", + "width": "max(1, canvas.width - 4)", + "height": "14", + "content": { + "type": "text", + "template": "Mistral", + "font_family": "Segoe UI", + "font_size": "min(10, (canvas.width - 4) / 5.5)", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "center", + "color": { + "color": "#A11200" + } + } + }, + { + "id": "mistral-weekly-value-dark", + "name": "mistral-weekly-value-dark", + "parent": "mistral-provider", + "render": "system.dark", + "x": "2", + "y": "18", + "width": "max(1, canvas.width - 4)", + "height": "14", + "content": { + "type": "text", + "template": "{mistral.weekly.label} {mistral.weekly.display:usage_badge}", + "font_family": "Segoe UI", + "font_size": "min(10, (canvas.width - 4) / 5.5)", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "center", + "color": { + "color": "#F5F5F5" + } + } + }, + { + "id": "mistral-weekly-value-light", + "name": "mistral-weekly-value-light", + "parent": "mistral-provider", + "render": "1 - system.dark", + "x": "2", + "y": "18", + "width": "max(1, canvas.width - 4)", + "height": "14", + "content": { + "type": "text", + "template": "{mistral.weekly.label} {mistral.weekly.display:usage_badge}", + "font_family": "Segoe UI", + "font_size": "min(10, (canvas.width - 4) / 5.5)", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "center", + "color": { + "color": "#202020" + } + } + }, + { + "id": "mistral-monthly-value-dark", + "name": "mistral-monthly-value-dark", + "parent": "mistral-provider", + "render": "system.dark", + "x": "2", + "y": "34", + "width": "max(1, canvas.width - 4)", + "height": "14", + "content": { + "type": "text", + "template": "{mistral.monthly.label} {mistral.monthly.display:usage_badge}", + "font_family": "Segoe UI", + "font_size": "min(10, (canvas.width - 4) / 5.5)", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "center", + "color": { + "color": "#F5F5F5" + } + } + }, + { + "id": "mistral-monthly-value-light", + "name": "mistral-monthly-value-light", + "parent": "mistral-provider", + "render": "1 - system.dark", + "x": "2", + "y": "34", + "width": "max(1, canvas.width - 4)", + "height": "14", + "content": { + "type": "text", + "template": "{mistral.monthly.label} {mistral.monthly.display:usage_badge}", + "font_family": "Segoe UI", + "font_size": "min(10, (canvas.width - 4) / 5.5)", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "center", + "color": { + "color": "#202020" + } + } + }, + { + "id": "mistral-weekly-bar", + "name": "mistral weekly usage", + "parent": "mistral-provider", + "render": "mistral.weekly.available", + "x": "4", + "y": "50", + "width": "max(1, canvas.width - 8)", + "height": "3", + "content": { + "type": "progress", + "value": "mistral.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#FF4A00" + }, + "track": { + "color": "#80808040" + }, + "corner_radius": "1" + } + }, + { + "id": "mistral-monthly-bar", + "name": "mistral monthly usage", + "parent": "mistral-provider", + "render": "mistral.monthly.available", + "x": "4", + "y": "54", + "width": "max(1, canvas.width - 8)", + "height": "3", + "content": { + "type": "progress", + "value": "mistral.monthly.display", + "direction": "left_to_right", + "fill": { + "color": "#FF4A00" + }, + "track": { + "color": "#80808040" + }, + "corner_radius": "1" + } } ] }, @@ -2760,6 +2950,212 @@ } } ] + }, + { + "id": "mistral-tray-icon", + "name": "Mistral usage", + "render": "providers.mistral.enabled", + "mouse_events": { + "click": "toggle(\"main\", render)", + "double_click": "toggle(\"main\", render)", + "right_click": "show_context_menu(\"classic-v1\")" + }, + "placement": { + "nest": "tray_icon" + }, + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF" + } + }, + "corner_radius": "3", + "children": [ + { + "id": "mistral-tray-high-outline", + "name": "Mistral high-usage red outline", + "render": "mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#FF4A00FF" + } + }, + "corner_radius": "3" + }, + { + "id": "mistral-tray-low-fill", + "name": "Mistral normal red fill", + "render": "mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FF4A00FF" + } + }, + "corner_radius": "1" + }, + { + "id": "mistral-tray-high-fill", + "name": "Mistral high-usage white fill", + "render": "mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF" + } + }, + "corner_radius": "1" + }, + { + "id": "mistral-tray-placeholder", + "name": "Mistral loading placeholder", + "render": "data.poll_ok == 0 || mistral.available == 0", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "Mi", + "font_family": "Arial Bold", + "font_size": "34", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-one-digit", + "name": "Mistral normal one-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display < 9.5 && mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-two-digits", + "name": "Mistral normal two-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 9.5 && mistral.headline.display < 99.5 && mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-three-digits", + "name": "Mistral normal three-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 99.5 && mistral.headline.percentage < 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-high-one-digit", + "name": "Mistral high-usage one-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display < 9.5 && mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + }, + { + "id": "mistral-tray-high-two-digits", + "name": "Mistral high-usage two-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 9.5 && mistral.headline.display < 99.5 && mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + }, + { + "id": "mistral-tray-high-three-digits", + "name": "Mistral high-usage three-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 99.5 && mistral.headline.percentage >= 90", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + } + ] } ] } diff --git a/src/themes/compact-fluent-quad.json b/src/themes/compact-fluent-quad.json index 0a5a9e2e..bbf2b558 100644 --- a/src/themes/compact-fluent-quad.json +++ b/src/themes/compact-fluent-quad.json @@ -2919,6 +2919,286 @@ "opacity": "1" } } + }, + { + "id": "mistral-provider", + "name": "Mistral provider", + "render": "providers.mistral.enabled", + "parent": "provider-row", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4 + 62", + "height": "46" + }, + { + "id": "mistral-api-segments-dark", + "name": "dark Mistral API segments", + "render": "system.dark", + "visibility": "100", + "parent": "mistral-provider", + "y": "10", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "height": "9", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "mistral.monthly.display", + "direction": "left_to_right", + "fill": { + "color": "#FF4A00FF", + "opacity": "1" + }, + "track": { + "color": "#444444FF", + "opacity": "1" + }, + "corner_radius": "1.5", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", + "segment_gap": "1" + } + }, + { + "id": "mistral-api-segments-light", + "name": "light Mistral API segments", + "render": "1 - system.dark", + "visibility": "100", + "parent": "mistral-provider", + "y": "10", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "height": "9", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "mistral.monthly.display", + "direction": "left_to_right", + "fill": { + "color": "#FF4A00FF", + "opacity": "1" + }, + "track": { + "color": "#AAAAAAFF", + "opacity": "1" + }, + "corner_radius": "1.5", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", + "segment_gap": "1" + } + }, + { + "id": "mistral-api-value-dark", + "name": "dark Mistral API value", + "render": "system.dark", + "visibility": "100", + "parent": "mistral-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", + "y": "8", + "width": "62", + "height": "13", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "API {mistral.monthly.display:usage_badge}", + "font_family": "Segoe UI", + "font_size": "12", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF8A5CFF", + "opacity": "1" + } + } + }, + { + "id": "mistral-api-value-light", + "name": "light Mistral API value", + "render": "1 - system.dark", + "visibility": "100", + "parent": "mistral-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", + "y": "8", + "width": "62", + "height": "13", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "API {mistral.monthly.display:usage_badge}", + "font_family": "Segoe UI", + "font_size": "12", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#B31200FF", + "opacity": "1" + } + } + }, + { + "id": "mistral-pool-segments-dark", + "name": "dark Mistral pool segments", + "render": "system.dark", + "visibility": "100", + "parent": "mistral-provider", + "y": "27", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "height": "9", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "mistral.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#FF4A00FF", + "opacity": "1" + }, + "track": { + "color": "#444444FF", + "opacity": "1" + }, + "corner_radius": "1.5", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", + "segment_gap": "1" + } + }, + { + "id": "mistral-pool-value-dark", + "name": "dark Mistral pool value", + "render": "system.dark", + "visibility": "100", + "parent": "mistral-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", + "y": "25", + "width": "62", + "height": "13", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.weekly.display:usage_line}", + "font_family": "Segoe UI", + "font_size": "12", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#FF8A5CFF", + "opacity": "1" + } + } + }, + { + "id": "mistral-pool-segments-light", + "name": "light Mistral pool segments", + "render": "1 - system.dark", + "visibility": "100", + "parent": "mistral-provider", + "y": "27", + "width": "ceil(10 / max(1, providers.count)) * 11 - 1", + "height": "9", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "progress", + "value": "mistral.weekly.display", + "direction": "left_to_right", + "fill": { + "color": "#FF4A00FF", + "opacity": "1" + }, + "track": { + "color": "#AAAAAAFF", + "opacity": "1" + }, + "corner_radius": "1.5", + "segments": 10, + "segments_expression": "ceil(10 / max(1, providers.count))", + "segment_gap": "1" + } + }, + { + "id": "mistral-pool-value-light", + "name": "light Mistral pool value", + "render": "1 - system.dark", + "visibility": "100", + "parent": "mistral-provider", + "x": "ceil(10 / max(1, providers.count)) * 11 - 1 + 4", + "y": "25", + "width": "62", + "height": "13", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.weekly.display:usage_line}", + "font_family": "Segoe UI", + "font_size": "12", + "weight": "medium", + "rendering": "clear_type", + "contrast": "1", + "align": "left", + "color": { + "color": "#B31200FF", + "opacity": "1" + } + } } ] }, @@ -5250,6 +5530,336 @@ } } ] + }, + { + "id": "mistral-tray-icon", + "name": "Mistral usage", + "render": "0", + "visibility": "100", + "placement": { + "reference": { + "region": "system_tray", + "display": 0 + }, + "nest": "tray_icon", + "horizontal": "right", + "vertical": "bottom", + "surface_horizontal": "right", + "surface_vertical": "bottom", + "offset_x": 0, + "offset_y": 0 + }, + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF", + "opacity": "1" + } + }, + "border": null, + "mouse_events": { + "click": "toggle(\"main\", render)", + "double_click": "toggle(\"main\", render)", + "right_click": "show_context_menu(\"classic-v1\")" + }, + "corner_radius": "3", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + }, + "children": [ + { + "id": "mistral-tray-high-outline", + "name": "Mistral high-usage red outline", + "render": "mistral.headline.percentage >= 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "colour", + "colour": { + "color": "#FF4A00FF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "3", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "mistral-tray-low-fill", + "name": "Mistral normal red fill", + "render": "mistral.headline.percentage < 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FF4A00FF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "1", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "mistral-tray-high-fill", + "name": "Mistral high-usage white fill", + "render": "mistral.headline.percentage >= 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "x": "3", + "y": "3", + "width": "58", + "height": "58", + "background": { + "type": "colour", + "colour": { + "color": "#FFFFFFFF", + "opacity": "1" + } + }, + "border": null, + "corner_radius": "1", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "none" + } + }, + { + "id": "mistral-tray-placeholder", + "name": "Mistral loading placeholder", + "render": "data.poll_ok == 0 || mistral.available == 0", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "Mi", + "font_family": "Arial Bold", + "font_size": "34", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FFFFFFFF", + "opacity": "1" + } + } + }, + { + "id": "mistral-tray-low-one-digit", + "name": "Mistral normal one-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display < 9.5 && mistral.headline.percentage < 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-two-digits", + "name": "Mistral normal two-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 9.5 && mistral.headline.display < 99.5 && mistral.headline.percentage < 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-low-three-digits", + "name": "Mistral normal three-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 99.5 && mistral.headline.percentage < 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FFFFFFFF" + } + } + }, + { + "id": "mistral-tray-high-one-digit", + "name": "Mistral high-usage one-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display < 9.5 && mistral.headline.percentage >= 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "50", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + }, + { + "id": "mistral-tray-high-two-digits", + "name": "Mistral high-usage two-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 9.5 && mistral.headline.display < 99.5 && mistral.headline.percentage >= 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "42", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + }, + { + "id": "mistral-tray-high-three-digits", + "name": "Mistral high-usage three-digit percentage", + "render": "data.poll_ok && mistral.available && mistral.headline.display >= 99.5 && mistral.headline.percentage >= 90", + "visibility": "100", + "parent": "mistral-tray-icon", + "width": "64", + "height": "64", + "background": { + "type": "none" + }, + "border": null, + "corner_radius": "0", + "layout": "freeform", + "align": "start", + "gap": "0", + "content": { + "type": "text", + "template": "{mistral.headline.display:0}", + "font_family": "Arial Bold", + "font_size": "30", + "weight": "bold", + "rendering": "antialiased", + "contrast": "1.4", + "align": "center", + "color": { + "color": "#FF4A00FF" + } + } + } + ] } ] } diff --git a/src/ui/theme.rs b/src/ui/theme.rs index f9f7a449..41c139ca 100644 --- a/src/ui/theme.rs +++ b/src/ui/theme.rs @@ -62,6 +62,7 @@ pub(crate) fn provider_mark_glyph(provider: ProviderId) -> char { ProviderId::Cursor => '\u{f005}', ProviderId::Grok => '\u{f006}', ProviderId::Copilot => '\u{f007}', + ProviderId::Mistral => '\u{f008}', } }