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:
parent
5da67899b7
commit
938e28f871
6 changed files with 126 additions and 11 deletions
|
@ -52,6 +52,14 @@ impl ThreadStore {
|
|||
})
|
||||
}
|
||||
|
||||
/// Returns the number of non-empty threads.
|
||||
pub fn non_empty_len(&self, cx: &AppContext) -> usize {
|
||||
self.threads
|
||||
.iter()
|
||||
.filter(|thread| !thread.read(cx).is_empty())
|
||||
.count()
|
||||
}
|
||||
|
||||
pub fn threads(&self, cx: &ModelContext<Self>) -> Vec<Model<Thread>> {
|
||||
let mut threads = self
|
||||
.threads
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue