assistant2: Thread history keyboard navigation (#23145)

Open and delete threads via keyboard:


https://github.com/user-attachments/assets/79b402ad-a49d-4c52-9d46-28a7bf32ff1f



Note: this doesn't include navigation in the "recent threads" section of
the empty state

Release Notes:

- N/A
This commit is contained in:
Agus Zubiaga 2025-01-17 18:41:17 -03:00 committed by GitHub
parent 5da67899b7
commit 938e28f871
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 126 additions and 11 deletions

View file

@ -428,13 +428,12 @@ impl AssistantPanel {
.color(Color::Muted),
),
)
.child(
v_flex().mx_auto().w_4_5().gap_2().children(
recent_threads
.into_iter()
.map(|thread| PastThread::new(thread, cx.view().downgrade())),
),
)
.child(v_flex().mx_auto().w_4_5().gap_2().children(
recent_threads.into_iter().map(|thread| {
// TODO: keyboard navigation
PastThread::new(thread, cx.view().downgrade(), false)
}),
))
.child(
h_flex().w_full().justify_center().child(
Button::new("view-all-past-threads", "View All Past Threads")