Show prompt usage in agent overflow menu (#29922)
This PR adds prompt usage information, and easy access to managing your account, to the agent overflow menu:  Currently this UI will only show after making a request. We'll work on eagerly getting the usage info later. Release Notes: - Added current prompt usage information to the agent menu (`...`) for Zed AI users
This commit is contained in:
@@ -5,6 +5,7 @@ use crate::{Icon, IconName, IconSize, Label, h_flex};
|
||||
pub struct ListSubHeader {
|
||||
label: SharedString,
|
||||
start_slot: Option<IconName>,
|
||||
end_slot: Option<AnyElement>,
|
||||
inset: bool,
|
||||
selected: bool,
|
||||
}
|
||||
@@ -14,6 +15,7 @@ impl ListSubHeader {
|
||||
Self {
|
||||
label: label.into(),
|
||||
start_slot: None,
|
||||
end_slot: None,
|
||||
inset: false,
|
||||
selected: false,
|
||||
}
|
||||
@@ -24,6 +26,11 @@ impl ListSubHeader {
|
||||
self
|
||||
}
|
||||
|
||||
pub fn end_slot(mut self, end_slot: AnyElement) -> Self {
|
||||
self.end_slot = Some(end_slot);
|
||||
self
|
||||
}
|
||||
|
||||
pub fn inset(mut self, inset: bool) -> Self {
|
||||
self.inset = inset;
|
||||
self
|
||||
@@ -73,7 +80,8 @@ impl RenderOnce for ListSubHeader {
|
||||
.color(Color::Muted)
|
||||
.size(LabelSize::Small),
|
||||
),
|
||||
),
|
||||
)
|
||||
.children(self.end_slot),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user