Skip to content

Commit b360c25

Browse files
Show Termux output instead of screen elements on next screenshot
1 parent 7efcfc0 commit b360c25

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2663,10 +2663,11 @@ private fun processCommands(text: String) {
26632663
}
26642664
val termuxOutputInfo = TermuxOutputPreferences.consumeOutput(appContext)?.let { "Termux output:\n$it" }
26652665
if (!termuxOutputInfo.isNullOrBlank()) {
2666-
Log.i(TAG, "buildEnrichedScreenInfo: Injecting Termux output into next screen-info bubble. chars=${termuxOutputInfo.length}")
2666+
Log.i(TAG, "buildEnrichedScreenInfo: Replacing screen-elements bubble with Termux output. chars=${termuxOutputInfo.length}")
2667+
return termuxOutputInfo
26672668
}
26682669
val missingInfo = listOfNotNull(appNotFoundInfo, termuxNotFoundInfo).joinToString("\n").ifBlank { null }
2669-
val extraInfo = listOfNotNull(missingInfo, retrievedInfo, termuxOutputInfo).joinToString("\n\n").ifBlank { null }
2670+
val extraInfo = listOfNotNull(missingInfo, retrievedInfo).joinToString("\n\n").ifBlank { null }
26702671

26712672
return when {
26722673
!extraInfo.isNullOrBlank() && !screenInfo.isNullOrBlank() -> "$extraInfo\n\n$screenInfo"

0 commit comments

Comments
 (0)