language_models: Fix Copilot models not loading (#32288)
Recently in this PR: https://github.com/zed-industries/zed/pull/32248 github copilot settings was introduced. This had missing settings update which was leading to github copilot models not getting fetched. This had missing subscription to update the settings inside the copilot language model provider. Which caused it not show models at all. cc @osiewicz Release Notes: - N/A --------- Co-authored-by: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com>
This commit is contained in:
1 parent
46773ebbd8
commit
104f601413
1 file changed
+8
@@ -68,6 +68,14 @@ impl CopilotChatLanguageModelProvider {
|
||||
State {
|
||||
_copilot_chat_subscription: copilot_chat_subscription,
|
||||
_settings_subscription: cx.observe_global::<SettingsStore>(|_, cx| {
|
||||
if let Some(copilot_chat) = CopilotChat::global(cx) {
|
||||
let settings = AllLanguageModelSettings::get_global(cx)
|
||||
.copilot_chat
|
||||
.clone();
|
||||
copilot_chat.update(cx, |chat, cx| {
|
||||
chat.set_settings(settings, cx);
|
||||
});
|
||||
}
|
||||
cx.notify();
|
||||
}),
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user