agent2: Add new "new thread" selector in the toolbar (#36133)

Release Notes:

- N/A
This commit is contained in:
Danilo Leal
2025-08-13 14:45:37 -03:00
committed by GitHub
parent 9a375f1419
commit cb0bc463f1
7 changed files with 526 additions and 328 deletions
+3 -3
View File
@@ -11,7 +11,7 @@ pub struct NewThreadButton {
}
impl NewThreadButton {
pub fn new(id: impl Into<ElementId>, label: impl Into<SharedString>, icon: IconName) -> Self {
fn new(id: impl Into<ElementId>, label: impl Into<SharedString>, icon: IconName) -> Self {
Self {
id: id.into(),
label: label.into(),
@@ -21,12 +21,12 @@ impl NewThreadButton {
}
}
pub fn keybinding(mut self, keybinding: Option<ui::KeyBinding>) -> Self {
fn keybinding(mut self, keybinding: Option<ui::KeyBinding>) -> Self {
self.keybinding = keybinding;
self
}
pub fn on_click<F>(mut self, handler: F) -> Self
fn on_click<F>(mut self, handler: F) -> Self
where
F: Fn(&mut Window, &mut App) + 'static,
{