ACP history mentions (#36551)
- **TEMP** - **Update @-mentions to use new history** Closes #ISSUE Release Notes: - N/A
This commit is contained in:
parent
159b5e9fb5
commit
5d2bb2466e
17 changed files with 581 additions and 392 deletions
|
@ -536,6 +536,28 @@ impl NativeAgent {
|
|||
})
|
||||
}
|
||||
|
||||
pub fn thread_summary(
|
||||
&mut self,
|
||||
id: acp::SessionId,
|
||||
cx: &mut Context<Self>,
|
||||
) -> Task<Result<SharedString>> {
|
||||
let thread = self.open_thread(id.clone(), cx);
|
||||
cx.spawn(async move |this, cx| {
|
||||
let acp_thread = thread.await?;
|
||||
let result = this
|
||||
.update(cx, |this, cx| {
|
||||
this.sessions
|
||||
.get(&id)
|
||||
.unwrap()
|
||||
.thread
|
||||
.update(cx, |thread, cx| thread.summary(cx))
|
||||
})?
|
||||
.await?;
|
||||
drop(acp_thread);
|
||||
Ok(result)
|
||||
})
|
||||
}
|
||||
|
||||
fn save_thread(&mut self, thread: Entity<Thread>, cx: &mut Context<Self>) {
|
||||
let database_future = ThreadsDatabase::connect(cx);
|
||||
let (id, db_thread) =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue