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:
@@ -9,9 +9,14 @@ class ChatBarAction extends StatelessWidget implements SegmentedOverflowable {
|
||||
required this.materialIcon,
|
||||
this.identifier,
|
||||
this.destructive = false,
|
||||
this.subtitle,
|
||||
});
|
||||
|
||||
final String label;
|
||||
|
||||
/// A short second line the More menu shows under [label] (the account the
|
||||
/// action acts on); the bar's icon button adds it to its tooltip.
|
||||
final String? subtitle;
|
||||
final VoidCallback onPressed;
|
||||
final IconData materialIcon;
|
||||
|
||||
@@ -27,14 +32,18 @@ class ChatBarAction extends StatelessWidget implements SegmentedOverflowable {
|
||||
icon: materialIcon,
|
||||
onPressed: onPressed,
|
||||
destructive: destructive,
|
||||
subtitle: subtitle,
|
||||
);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final subtitle = this.subtitle;
|
||||
return Semantics(
|
||||
identifier: identifier,
|
||||
child: IconButton(
|
||||
tooltip: label,
|
||||
tooltip: subtitle == null || subtitle.isEmpty
|
||||
? label
|
||||
: '$label\n$subtitle',
|
||||
onPressed: onPressed,
|
||||
icon: Icon(materialIcon),
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user