assistant2: Combine history views into one (#25293)
This PR combines the two history views in Assistant2 into one. <img width="1309" alt="Screenshot 2025-02-20 at 5 34 37 PM" src="https://github.com/user-attachments/assets/fbb08542-58b5-4930-8a20-254234e335fa" /> <img width="1309" alt="Screenshot 2025-02-20 at 5 34 41 PM" src="https://github.com/user-attachments/assets/1174849e-edad-4e02-8bf3-bb92aafba4f8" /> Release Notes: - N/A
This commit is contained in:
parent
3a222f0666
commit
74c581b9f4
6 changed files with 265 additions and 155 deletions
|
@ -350,6 +350,12 @@ impl ContextStore {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn contexts(&self) -> Vec<SavedContextMetadata> {
|
||||
let mut contexts = self.contexts_metadata.iter().cloned().collect::<Vec<_>>();
|
||||
contexts.sort_unstable_by_key(|thread| std::cmp::Reverse(thread.mtime));
|
||||
contexts
|
||||
}
|
||||
|
||||
pub fn create(&mut self, cx: &mut Context<Self>) -> Entity<AssistantContext> {
|
||||
let context = cx.new(|cx| {
|
||||
AssistantContext::local(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue