ac4af582301a4e8a29245dbba767eba31334ddf9
3
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
eb779ce92a |
gui: the tray icon's tooltip is in magpie's language (yi_time)
yi_time in #feedback: magpie set to Chinese on Windows, and the tray
icon's hover tooltip said "Today: 121K tokens (2.9K in · 180 out ·
118K cached)" and "3 requests" in English. The tray menu already
followed magpie's language (trayLang, #301); the tooltip's words were
hard-coded English in trayusage.go.
Now every tooltip is in trayLang(settings.Lang, systemLang), on
Windows, macOS and Linux alike. That covers trayIdleTip, magpie's
totals (trayTotalCard), and each subscription card (trayCardText: its
use or what is left, the pace, when it resets, until's d/h/m, "as of
…"). The words are in trayWords beside the menu's, for zh, zh-TW, ja
and de; English stays the key and the fallback. A window's name and an
error are still the card's own. A change of language in Settings now
also refreshes the tooltip (onTrayUsage); before, only the menu was
relabelled. The test-only trayUsageText and trayUsageView stay in
English, so the existing tests keep their strings.
Test: TestTrayTooltipFollowsMagpiesLanguage.
- yi_time's own numbers in zh: "magpie\n今天:121K token(输入 2.9K ·
输出 180 · 缓存 118K)\n3 个请求".
- The same numbers in en are unchanged.
- Covers the total card and a card's used, left, reset and as-of.
- For zh, zh-TW, ja and de, no English word in the idle, totals, card
(with pace) or combined tooltips.
Run at this head (rebased on
|
||
|
|
94f6f60925 |
tray: every window a card reports can be picked alone for the menu bar, Cursor's Grok Bot too (CrazyJal on X)
CrazyJal on X (tweet 2116833523604886006): Settings > Usage > Menu bar
windows, Cursor's pill had no choice for the Grok Bot window alone.
Why: the picker offered only the windows the menu bar shows unpicked
(trayWindows), which leaves out every window set aside. The Cursor
plugin reports Grok Bot aside (so it doesn't stop Cursor's models), so
it was never offered. And kinds were only a span ("7d"): Grok Bot and a
weekly plan's Weekly are both 7 days, as are Antigravity's two pools, so
two windows shared one kind, the GUI showed one of them, and picking it
picked both. The plugin reports the window fine; nothing changes there.
Fix (the class, every provider): trayChoices lists every window of a
card that the menu bar can say as a percent (trayCounted): the usual
ones first, then the rest (money aside, one model's window, Grok Bot),
marked TrayExtra and shown only when picked. Every choice has a kind of
its own: a usual window keeps its span's kind where it is the only one
of that span (so existing picks like claude:["5h"] keep working);
another of that span, and every extra, gets its model or name after it
("7d:grok bot", "7d:gemini · 7 days"). Unpicked, every card shows what
it showed before. The Settings pill offers the extras, and drops a pick
only when it is empty or exactly the usual windows.
Run (mote, at this tree, committed then as 0750aa783, on origin/main
|
||
|
|
f4a134d78f |
tray: a ticked card with no account-wide window still shows (Antigravity, nivekxft on X)
nivekxft on X: Antigravity ticked under Settings › Allowances in the menu
bar, and the Mac's menu bar showed the other three cards but none for it.
Cause: trayWindows kept only windows that are neither Aside nor a single
model's (Model set). Antigravity's card has nothing else: a window per
model, and its pools' windows ("Gemini", "Claude & GPT"), which
google.go's pools() marks Aside so routing goes on reading the
per-model windows. So trayCardText returned an empty label and an empty
tooltip, and trayCardsView dropped the card. The real card read from
quotas.json (an Antigravity Starter account, 10-31) has 13 per-model
windows and two pool 7-day windows, and nothing the old filter kept.
Fix: when a card has no account-wide window, the menu bar takes, in
order,
- trayShared: its windows over all models that routing sets aside and
that tell a share (Antigravity's pools, named "Gemini · 7 days" as the
Usage page names them; Ollama's plan windows, all Aside while bought
credits carry the account),
- trayModels: else its per-model windows, the tightest of each family
(as the Usage page shows one a family), most used first (Gemini CLI,
whose card is per-model only; Antigravity when the pool summary can't
be read).
Text rows, unlimited rows, wallet balances and a money figure with no
share are never shown as a percent. A card with an account-wide window
is as before. withTrayKinds now marks the windows trayWindows returns, so
Settings' window picker follows the same choice.
Siblings: Gemini CLI (per-model windows only) and Ollama with bought
credits (every window Aside) were dropped the same way and are covered.
Run (mote, at
|