assistant2: Make context persistent in the thread (#22789)
This PR makes it so the context is persistent in the thread, rather than having to reattach it for each message. This PR intentionally does not make an attempt to refresh the attached context if it changes. That will come in a follow-up. Release Notes: - N/A
This commit is contained in:
parent
76a8b55f77
commit
fffa40f973
3 changed files with 26 additions and 12 deletions
|
@ -142,7 +142,9 @@ impl MessageEditor {
|
|||
editor.clear(cx);
|
||||
text
|
||||
});
|
||||
let context = self.context_store.update(cx, |this, _cx| this.drain());
|
||||
let context = self
|
||||
.context_store
|
||||
.update(cx, |this, _cx| this.context().clone());
|
||||
|
||||
self.thread.update(cx, |thread, cx| {
|
||||
thread.insert_user_message(user_message, context, cx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue