Load Profile state from Thread and tie visibility to the thread's model (#30090)
When deciding if a model supports tools or not, we weren't reading from the configured model in a given thread. This also stores the profile on the thread, which matches the behavior of the Model and Max Mode, which we also already store per thread. Hopefully this helps alleviate some confusion. Release Notes: - agent: Save profile selection per-Agent thread
This commit is contained in:
parent
02ed4aefb8
commit
3615d6d96c
4 changed files with 67 additions and 23 deletions
|
@ -199,6 +199,10 @@ impl MessageEditor {
|
|||
)
|
||||
});
|
||||
|
||||
let profile_selector = cx.new(|cx| {
|
||||
ProfileSelector::new(thread.clone(), thread_store, editor.focus_handle(cx), cx)
|
||||
});
|
||||
|
||||
Self {
|
||||
editor: editor.clone(),
|
||||
project: thread.read(cx).project().clone(),
|
||||
|
@ -215,8 +219,7 @@ impl MessageEditor {
|
|||
model_selector,
|
||||
edits_expanded: false,
|
||||
editor_is_expanded: false,
|
||||
profile_selector: cx
|
||||
.new(|cx| ProfileSelector::new(fs, thread_store, editor.focus_handle(cx), cx)),
|
||||
profile_selector,
|
||||
last_estimated_token_count: None,
|
||||
update_token_count_task: None,
|
||||
_subscriptions: subscriptions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue