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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user