Fix language model selector (#26138)
This PR fixes the language model selector.
I tried to piece together the state prior to #25697 (the state it was in
at 11838cf89e
) while retaining unrelated
changes that happened since then.
Release Notes:
- Fixed an issue where language models would not be authenticated until
after the model selector was opened (Preview only).
This commit is contained in:
parent
ad9c508a72
commit
66784c0b3f
7 changed files with 289 additions and 200 deletions
|
@ -54,6 +54,7 @@ impl MessageEditor {
|
|||
let context_store = cx.new(|_cx| ContextStore::new(workspace.clone()));
|
||||
let context_picker_menu_handle = PopoverMenuHandle::default();
|
||||
let inline_context_picker_menu_handle = PopoverMenuHandle::default();
|
||||
let model_selector_menu_handle = PopoverMenuHandle::default();
|
||||
|
||||
let editor = cx.new(|cx| {
|
||||
let mut editor = Editor::auto_height(10, window, cx);
|
||||
|
@ -106,8 +107,15 @@ impl MessageEditor {
|
|||
context_picker_menu_handle,
|
||||
inline_context_picker,
|
||||
inline_context_picker_menu_handle,
|
||||
model_selector: cx
|
||||
.new(|cx| AssistantModelSelector::new(fs, editor.focus_handle(cx), window, cx)),
|
||||
model_selector: cx.new(|cx| {
|
||||
AssistantModelSelector::new(
|
||||
fs,
|
||||
model_selector_menu_handle,
|
||||
editor.focus_handle(cx),
|
||||
window,
|
||||
cx,
|
||||
)
|
||||
}),
|
||||
use_tools: false,
|
||||
_subscriptions: subscriptions,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue