Chat: show the active Claude account in the send tooltip, menu and limit banner

usage.account now carries the email and organization of the account
Claude Code is signed in to (from its initialize account, or the saved
account just switched to), sent at process start and after a switch.
The app shows it as the send tooltip's usage prefix, the Claude account
menu subtitle, the usage-limit banner's status line and the info sheet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-30 16:33:46 +00:00
parent e80f18969c
commit 0dc805ae0e
22 changed files with 386 additions and 62 deletions
@@ -14,7 +14,8 @@ import 'chat_thread_controller.dart';
/// Above the composer while the chat's account is out of quota, as Claude
/// Code's own app shows it: "Out of usage credits" (or the refusal's own
/// "You've hit your 5-hour limit"), "Auto-resuming at 15:41", an
/// "You've hit your 5-hour limit"), the account that hit it and
/// "Auto-resuming at 15:41", an
/// "Auto-continue when limits reset" checkbox and Try again.
///
/// With auto-continue on (a preference shared by every chat, on by default,
@@ -179,7 +180,10 @@ class _ChatUsageLimitBannerState extends State<ChatUsageLimitBanner> {
final resumesAt = pending.isEmpty
? limit.sendAt
: chatScheduledSendAt(pending.first['send_at'], now)!;
final email = widget.thread.accountUsage?.email ?? '';
final status = [
// The account that hit the limit.
if (email.isNotEmpty) email,
if (enabled && refused != null)
'Auto-resuming at ${time(resumesAt)}'
else