Assign meaningful names to some single-letter bindings (#51432)
This PR assigns meaningful names to some single-letter bindings we were using to refer to the organization. Release Notes: - N/A
This commit is contained in:
1 parent
125c52b665
commit
cd1b2fbfb0
3 files changed
+5
-5
No files matched your search
@@ -159,7 +159,7 @@ impl RefreshLlmTokenListener {
|
||||
.user_store
|
||||
.read(cx)
|
||||
.current_organization()
|
||||
.map(|o| o.id.clone());
|
||||
.map(|organization| organization.id.clone());
|
||||
cx.spawn(async move |this, cx| {
|
||||
llm_api_token.refresh(&client, organization_id).await?;
|
||||
this.update(cx, |_this, cx| cx.emit(LlmTokenRefreshedEvent))
|
||||
|
||||
@@ -157,7 +157,7 @@ impl State {
|
||||
.user_store
|
||||
.read(cx)
|
||||
.current_organization()
|
||||
.map(|o| o.id.clone());
|
||||
.map(|organization| organization.id.clone());
|
||||
cx.spawn(async move |this, cx| {
|
||||
let response =
|
||||
Self::fetch_models(client, llm_api_token, organization_id).await?;
|
||||
@@ -705,7 +705,7 @@ impl LanguageModel for CloudLanguageModel {
|
||||
.user_store
|
||||
.read(cx)
|
||||
.current_organization()
|
||||
.map(|o| o.id.clone());
|
||||
.map(|organization| organization.id.clone());
|
||||
let model_id = self.model.id.to_string();
|
||||
let generate_content_request =
|
||||
into_google(request, model_id.clone(), GoogleModelMode::Default);
|
||||
@@ -777,7 +777,7 @@ impl LanguageModel for CloudLanguageModel {
|
||||
user_store
|
||||
.read(cx)
|
||||
.current_organization()
|
||||
.map(|o| o.id.clone())
|
||||
.map(|organization| organization.id.clone())
|
||||
});
|
||||
let thinking_allowed = request.thinking_allowed;
|
||||
let enable_thinking = thinking_allowed && self.model.supports_thinking;
|
||||
|
||||
@@ -55,7 +55,7 @@ impl WebSearchProvider for CloudWebSearchProvider {
|
||||
.user_store
|
||||
.read(cx)
|
||||
.current_organization()
|
||||
.map(|o| o.id.clone());
|
||||
.map(|organization| organization.id.clone());
|
||||
let body = WebSearchBody { query };
|
||||
cx.background_spawn(async move {
|
||||
perform_web_search(client, llm_api_token, organization_id, body).await
|
||||
|
||||
Reference in new issue
Block a user