Skip to content

Commit 2e4e9f3

Browse files
Update PhotoReasoningViewModel.kt
1 parent fd49c83 commit 2e4e9f3

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,7 @@ class PhotoReasoningViewModel(
745745
if (commandProcessingJob?.isActive != true || stopExecutionFlag.get()) return@launch // Check for cancellation
746746
try {
747747
// Parse commands from the text
748-
val commands = CommandParser.parseCommands(text)
749-
748+
val commands = CommandParser.parseCommands(text, clearBuffer = true)
750749
if (commands.isNotEmpty()) {
751750
if (commandProcessingJob?.isActive != true || stopExecutionFlag.get()) return@launch
752751
Log.d(TAG, "Found ${commands.size} commands in response")

0 commit comments

Comments
 (0)