π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
Hide increase-context option on overflow dialog
Prateek Sunal0fab909c58b0
diff --git a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.ktindex 2c782a1543..2771c15080 100644--- a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt+++ b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/HomeNavigation.kt@@ -133,10 +133,6 @@ internal fun HomeNavigation(store.startModelDownload(userInitiated = userInitiated)},onOverflowTrim = store::confirmOverflowTrim,- onOverflowIncreaseContext = {- store.cancelOverflowDialog()- navController.navigate(HomeRoute.ModelSettings)- },onOverflowCancel = store::cancelOverflowDialog)}diff --git a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatOverlays.kt b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatOverlays.ktindex 9140de2d39..e0b30049a9 100644--- a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatOverlays.kt+++ b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatOverlays.kt@@ -1,7 +1,6 @@package io.ente.ensu.chatimport androidx.compose.foundation.background-import androidx.compose.foundation.layout.Arrangementimport androidx.compose.foundation.layout.Boximport androidx.compose.foundation.layout.Columnimport androidx.compose.foundation.layout.Row@@ -37,15 +36,16 @@ import io.ente.ensu.utils.rememberEnsuHapticsinternal fun OverflowDialog(state: OverflowDialogState,onTrim: () -> Unit,- onIncreaseContext: () -> Unit,onCancel: () -> Unit) {+ val overflowMessage = "Input uses ${state.inputTokens} tokens (budget ${state.inputBudget}). Trim history to continue."+AlertDialog(onDismissRequest = onCancel,title = { Text(text = "Context limit reached", style = EnsuTypography.h3) },text = {Text(- text = "Input uses ${state.inputTokens} tokens (budget ${state.inputBudget}). Trim history or increase context size?",+ text = overflowMessage,style = EnsuTypography.body,color = EnsuColor.textPrimary())@@ -56,13 +56,8 @@ internal fun OverflowDialog(}},dismissButton = {- Row(horizontalArrangement = Arrangement.spacedBy(EnsuSpacing.sm.dp)) {- TextButton(onClick = onIncreaseContext) {- Text(text = "Increase context", color = EnsuColor.textPrimary())- }- TextButton(onClick = onCancel) {- Text(text = "Cancel", color = EnsuColor.textMuted())- }+ TextButton(onClick = onCancel) {+ Text(text = "Cancel", color = EnsuColor.textMuted())}},containerColor = EnsuColor.backgroundBase()diff --git a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatView.kt b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatView.ktindex 1bff5fa9a0..6c710918cc 100644--- a/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatView.kt+++ b/mobile/native/android/apps/ensu/app-ui/src/main/java/io/ente/ensu/chat/ChatView.kt@@ -52,7 +52,6 @@ fun ChatView(onOpenAttachment: (Attachment) -> Unit,onStartDownload: (Boolean) -> Unit,onOverflowTrim: () -> Unit,- onOverflowIncreaseContext: () -> Unit,onOverflowCancel: () -> Unit) {val showDownloadOnboarding by remember(@@ -187,7 +186,6 @@ fun ChatView(OverflowDialog(state = overflow,onTrim = onOverflowTrim,- onIncreaseContext = onOverflowIncreaseContext,onCancel = onOverflowCancel)}diff --git a/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift b/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swiftindex 32e661068e..8f4c1d8bfa 100644--- a/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift+++ b/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift@@ -211,10 +211,6 @@ struct ChatView: View {Button("Trim history") {viewModel.confirmOverflowTrim()}- Button("Increase context") {- viewModel.cancelOverflowDialog()- viewState.showModelSettings = true- }Button("Cancel", role: .cancel) {viewModel.cancelOverflowDialog()}