assistant2: Expose ActiveThread::thread via a getter (#23577)

This PR exposes the `thread` file on the `ActiveThread` via a getter
rather than exposing the field directly.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers
2025-01-23 21:54:16 +00:00
committed by GitHub
parent 52494f3fdf
commit ec91a8dc82
2 changed files with 6 additions and 2 deletions
+5 -1
View File
@@ -22,7 +22,7 @@ pub struct ActiveThread {
workspace: WeakView<Workspace>,
language_registry: Arc<LanguageRegistry>,
tools: Arc<ToolWorkingSet>,
pub(crate) thread: Model<Thread>,
thread: Model<Thread>,
messages: Vec<MessageId>,
list_state: ListState,
rendered_messages_by_id: HashMap<MessageId, View<Markdown>>,
@@ -68,6 +68,10 @@ impl ActiveThread {
this
}
pub fn thread(&self) -> &Model<Thread> {
&self.thread
}
pub fn is_empty(&self) -> bool {
self.messages.is_empty()
}