Repository navigation
windsurf, ollama, antigravity: no quota is informational, not a measured 0 % (VibeTV-shop/vibetv#714) - #27
Conversation
…(port of #18 to v0.70.0-vibetv.2) Ports #18 (four commits, base `vibetv`) onto the line that VibeTV actually pins (nesszer main + fork patches, v0.70.0-vibetv.2). Only rust/src/providers/windsurf/mod.rs changes. - Reads %APPDATA%\Devin\User\globalStorage\state.vscdb, the flat per-account cachedPlanInfoData:<id> entry (remainingMessages / totalMessages). The Windsurf folder is read only when no Devin database exists. Invalid counters and several cached accounts stay unavailable. - endTimestamp <= 0 means "no end date": no "Expires" text is made up. - A plan cache without any quota is an error, not 0 % (the behaviour of fork PR #15, which this line does not have for Windsurf). This line's infallible snapshot_from_plan became a Result for that. - This line has no ProviderMetadata / Provider::metadata / supports_cli, so those parts of #18 are dropped. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ured 0 % (VibeTV-shop/vibetv#714) Ollama's settings page with a weekly block but no monthly/session block, and Antigravity's GetUserStatus without any model that has quota_info, built RateWindow::new(0.0): a measured 0 % window that serializes with usageKnown true. Both now use RateWindow::informational like the Ollama API path and the Antigravity remote path already do. Ollama's rate_window_from_usage_block takes the block directly, since the None case is gone. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Windows check of this head ( Machine: Windows 11 bench laptop, no real Windsurf/Ollama/Antigravity account. Throwaway
Ollama and Antigravity legacy: no account/server available, so the three red-first tests of this PR plus the Windsurf ones ran natively on Windows ( Not checked: a live Ollama or Antigravity provider, and a VibeTV frame/Control Center run with this CLI (needs the pin change, not made). |
Goal
A provider without a quota never shows a measured 0 % (VibeTV-shop/vibetv#714, "never invent percentages").
RateWindow::new(0.0)serializes withoutusageKnownand withis_informational: false, so a consumer reads it as measured.What changes (two commits on top of
v0.70.0-vibetv.5)7057468, unchanged). Besides reading the Devin Desktop plan cache, it turns a plan row without quota into an error and usesRateWindow::informationalfor a missing primary next to a present secondary. That is the Windsurf part of Port upstream 0.57.0: re-land stranded Codex scanner, OpenCodex numeric and reserve pricing (#488-#490) nesszer/Win-CodexBar#714 (windsurf/mod.rs:165onvibetv.5). windsurf: read the Devin Desktop plan cache, no invented expiry date (port of #18 to the pinned nesszer-main line) #24 itself stays untouched and becomes redundant once this one merges.ollama/mod.rs: a settings page with a weekly block but no monthly/session block (and no wallet) builtRateWindow::new(0.0)as the primary. Thematchnow has oneNonearm:RateWindow::informational("No quota reported").hidden_on_card(), the same value the wallet-only page and the API path already use.rate_window_from_usage_blocktakes the block directly because itsNonecase is gone.antigravity/legacy_status.rs:GetUserStatuswithout any model that hasquota_infobuiltRateWindow::new(0.0). It now usesRateWindow::informational(LIMITS_NOT_AVAILABLE), the same text the remote path (remote.rs) already uses; the constant becamepub(super).Tests
Red first, then green:
providers::ollama::tests::weekly_only_page_keeps_primary_informational_instead_of_zero_percent: failed withassertion failed: result.usage.primary.is_informational.providers::antigravity::legacy_status::tests::no_model_with_quota_info_is_informational_instead_of_zero_percentand...::no_model_quotas_is_informational_instead_of_zero_percent: both failed onis_informational.providers::windsurf17 passed).cargo test --lib providers::ollama48 passed,providers::windsurf17 passed,providers::antigravity199 passed, 1 failed:remote::tests::quota_requests_carry_bearer_and_hub_user_agentexpects the Windows user agent and fails on macOS (antigravity/hub/2.9.1 darwin/arm64), not touched by this change.cargo fmt --checkandclippy -D warningsreport only findings that exist on the base (files not touched here / macOS dead-code).Not checked
Merge and release
Not merged, no tag, no release. VibeTV bumps
scripts/fetch-win-codexbar.ps1once a fork release (v0.70.0-vibetv.6) exists, together with VibeTV-shop/vibetv#700.🤖 Generated with Claude Code