Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[ensu] Gate Packs settings and tune retrieval

setalp72721480a1ee
diff --git a/mobile/native/android/apps/ensu/app/src/main/java/io/ente/ensu/settings/SettingsScreen.kt b/mobile/native/android/apps/ensu/app/src/main/java/io/ente/ensu/settings/SettingsScreen.kt
index 189c3c5e1e..ac491feadf 100644
--- a/mobile/native/android/apps/ensu/app/src/main/java/io/ente/ensu/settings/SettingsScreen.kt
+++ b/mobile/native/android/apps/ensu/app/src/main/java/io/ente/ensu/settings/SettingsScreen.kt
@@ -43,6 +43,8 @@ import io.ente.ensu.designsystem.EnsuSpacing
import io.ente.ensu.designsystem.EnsuTypography
import io.ente.ensu.designsystem.HugeIcons
+private const val IS_ENSU_PACKS_ENABLED = false
+
@Composable
fun SettingsScreen(
buildVersion: String,
@@ -69,13 +71,15 @@ fun SettingsScreen(
)
)
- add(
- SettingsItem(
- title = "Ensu Packs",
- iconRes = HugeIcons.PackageIcon,
- onClick = onOpenKnowledge
+ if (IS_ENSU_PACKS_ENABLED) {
+ add(
+ SettingsItem(
+ title = "Ensu Packs",
+ iconRes = HugeIcons.PackageIcon,
+ onClick = onOpenKnowledge
+ )
)
- )
+ }
add(
SettingsItem(
diff --git a/mobile/native/apple/apps/ensu/Ensu/Settings/SettingsView.swift b/mobile/native/apple/apps/ensu/Ensu/Settings/SettingsView.swift
index f905623047..3b98e82358 100644
--- a/mobile/native/apple/apps/ensu/Ensu/Settings/SettingsView.swift
+++ b/mobile/native/apple/apps/ensu/Ensu/Settings/SettingsView.swift
@@ -1,6 +1,8 @@
import SwiftUI
import Foundation
+private let isEnsuPacksEnabled = false
+
struct SettingsView: View {
@ObservedObject var knowledgeStore: KnowledgeStore
let onSignIn: () -> Void
@@ -163,18 +165,22 @@ struct SettingsView: View {
private var signInTitle: String { "Sign In to Backup" }
private var allItems: [SettingsItem] {
- [
- SettingsItem(
+ var items: [SettingsItem] = []
+ if isEnsuPacksEnabled {
+ items.append(SettingsItem(
title: "Ensu Packs",
iconName: "PackageIcon",
destination: AnyView(KnowledgeSettingsView(store: knowledgeStore))
- ),
+ ))
+ }
+ items.append(
SettingsItem(
title: "Logs",
iconName: "Bug01Icon",
destination: AnyView(LogsView(embeddedInNavigation: true))
)
- ]
+ )
+ return items
}
private var advancedItems: [SettingsItem] {
diff --git a/rust/crates/ensu/src/config/knowledge.rs b/rust/crates/ensu/src/config/knowledge.rs
index f0c44d88da..35ae281cf5 100644
--- a/rust/crates/ensu/src/config/knowledge.rs
+++ b/rust/crates/ensu/src/config/knowledge.rs
@@ -126,7 +126,7 @@ pub(crate) fn knowledge_datasets() -> Vec<KnowledgeDatasetConfig> {
download_size_bytes: 167_849_446,
max_chars: 600,
source_url_template: "https://simple.wikipedia.org/wiki/{title}".to_owned(),
- relevance_threshold: 0.55,
+ relevance_threshold: 0.5,
attribution: AttributionConfig {
credit: "Simple English Wikipedia contributors".to_owned(),
license_label: KNOWLEDGE_LICENSE_LABEL.to_owned(),
@@ -149,7 +149,7 @@ pub(crate) fn knowledge_datasets() -> Vec<KnowledgeDatasetConfig> {
download_size_bytes: 202_595_475,
max_chars: 1_400,
source_url_template: "https://en.wikibooks.org/wiki/{title}".to_owned(),
- relevance_threshold: 0.55,
+ relevance_threshold: 0.5,
attribution: AttributionConfig {
credit: "Wikibooks contributors".to_owned(),
license_label: KNOWLEDGE_LICENSE_LABEL.to_owned(),