Skip to content

Commit 6e19049

Browse files
Clear pending Mistral message on failure to unblock next runs
1 parent 20e8aac commit 6e19049

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

app/src/main/kotlin/com/google/ai/sample/feature/multimodal/PhotoReasoningViewModel.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,7 @@ class PhotoReasoningViewModel(
13001300
withContext(Dispatchers.Main) {
13011301
Log.e(TAG, "Mistral API call failed", e)
13021302
_uiState.value = PhotoReasoningUiState.Error(e.message ?: "Unknown error")
1303+
_chatState.replaceLastPendingMessage()
13031304
appendErrorMessage("Error: ${e.message}")
13041305
saveChatHistory(context)
13051306
}

0 commit comments

Comments
 (0)