This commit is contained in:
Antonio Scandurra 2023-12-06 12:12:28 +01:00
parent d86da04584
commit b29cea287b
4 changed files with 40 additions and 35 deletions

View file

@ -2835,7 +2835,7 @@ impl InlineAssistant {
)
})?;
if answer.next().await == Some(0) {
if answer.await? == 0 {
this.update(&mut cx, |this, _| {
this.semantic_permissioned = Some(true);
})?;
@ -2875,7 +2875,7 @@ impl InlineAssistant {
// This has to be updated to accomodate for semantic_permissions
if semantic_permissioned.await.unwrap_or(false) {
semantic_index
.update(&mut cx, |index, cx| index.index_project(project, cx))
.update(&mut cx, |index, cx| index.index_project(project, cx))?
.await
} else {
Err(anyhow!("project is not permissioned for semantic indexing"))
@ -3453,7 +3453,7 @@ fn report_assistant_event(
.default_open_ai_model
.clone();
let telemetry_settings = TelemetrySettings::get_global(cx);
let telemetry_settings = TelemetrySettings::get_global(cx).clone();
telemetry.report_assistant_event(
telemetry_settings,