Skip to content

armgit / ente

Public Imported from GitHub
0

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

Use friendlier copy for overflow dialog

Prateek Sunal067f00a20d3b
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.kt
index e0b30049a9..2578755eb1 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
@@ -38,11 +38,11 @@ internal fun OverflowDialog(
onTrim: () -> Unit,
onCancel: () -> Unit
) {
- val overflowMessage = "Input uses ${state.inputTokens} tokens (budget ${state.inputBudget}). Trim history to continue."
+ val overflowMessage = "This conversation is too long for the model to process. Some older messages will be dropped to make room."
AlertDialog(
onDismissRequest = onCancel,
- title = { Text(text = "Context limit reached", style = EnsuTypography.h3) },
+ title = { Text(text = "Conversation too long", style = EnsuTypography.h3) },
text = {
Text(
text = overflowMessage,
@@ -52,7 +52,7 @@ internal fun OverflowDialog(
},
confirmButton = {
TextButton(onClick = onTrim) {
- Text(text = "Trim history", color = EnsuColor.textPrimary())
+ Text(text = "Continue", color = EnsuColor.textPrimary())
}
},
dismissButton = {
diff --git a/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift b/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift
index 8f4c1d8bfa..7c2906e535 100644
--- a/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift
+++ b/mobile/native/darwin/Apps/ensu/ensu/Chat/ChatView.swift
@@ -207,19 +207,15 @@ struct ChatView: View {
secondaryButton: .cancel()
)
}
- .confirmationDialog("Context limit reached", isPresented: overflowDialogPresented, titleVisibility: .visible) {
- Button("Trim history") {
+ .confirmationDialog("Conversation too long", isPresented: overflowDialogPresented, titleVisibility: .visible) {
+ Button("Continue") {
viewModel.confirmOverflowTrim()
}
Button("Cancel", role: .cancel) {
viewModel.cancelOverflowDialog()
}
} message: {
- if let alert = viewModel.overflowAlert {
- Text("Input uses \(alert.inputTokens) tokens (budget \(alert.inputBudget)).")
- } else {
- Text("")
- }
+ Text("This conversation is too long for the model to process. Some older messages will be dropped to make room.")
}
.overlay {
if viewState.showSignInComingSoon {