diff --git a/crates/extension_host/src/wasm_host/llm_provider.rs b/crates/extension_host/src/wasm_host/llm_provider.rs index c1fed7bde87faefd483d479360f4614974fe2551..acfdc965ba522540f5789f8cb4c45d65cf51d02a 100644 --- a/crates/extension_host/src/wasm_host/llm_provider.rs +++ b/crates/extension_host/src/wasm_host/llm_provider.rs @@ -431,12 +431,13 @@ impl ExtensionProviderConfigurationView { let has_credentials = credentials.is_some(); // Update authentication state based on stored credentials - let _ = cx.update(|cx| { + cx.update(|cx| { state.update(cx, |state, cx| { state.is_authenticated = has_credentials; cx.notify(); }); - }); + }) + .log_err(); this.update(cx, |this, cx| { this.loading_credentials = false; @@ -537,12 +538,13 @@ impl ExtensionProviderConfigurationView { let has_credentials = credentials.is_some(); - let _ = cx.update(|cx| { + cx.update(|cx| { state.update(cx, |state, cx| { state.is_authenticated = has_credentials; cx.notify(); }); - }); + }) + .log_err(); }) .detach(); } @@ -569,12 +571,13 @@ impl ExtensionProviderConfigurationView { .log_err(); // Update state to authenticated - let _ = cx.update(|cx| { + cx.update(|cx| { state.update(cx, |state, cx| { state.is_authenticated = true; cx.notify(); }); - }); + }) + .log_err(); }) .detach(); } @@ -596,12 +599,13 @@ impl ExtensionProviderConfigurationView { .log_err(); // Update state to unauthenticated - let _ = cx.update(|cx| { + cx.update(|cx| { state.update(cx, |state, cx| { state.is_authenticated = false; cx.notify(); }); - }); + }) + .log_err(); }) .detach(); } @@ -700,13 +704,14 @@ impl ExtensionProviderConfigurationView { _ => Vec::new(), }; - let _ = cx.update(|cx| { + cx.update(|cx| { state.update(cx, |state, cx| { state.is_authenticated = true; state.available_models = new_models; cx.notify(); }); - }); + }) + .log_err(); None } Ok(Ok(Err(e))) => {