Skip to content

Commit ba530e9

Browse files
Add files via upload
1 parent d71616e commit ba530e9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/kotlin/com/google/ai/sample/util/CommandParser.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ object CommandParser {
2222
fun parseCommands(text: String): List<Command> {
2323
val commands = mutableListOf<Command>()
2424

25+
// Log the text being parsed for debugging
26+
Log.d(TAG, "Parsing commands from text: $text")
27+
2528
// Find clickOnButton commands
2629
val clickMatcher = CLICK_BUTTON_PATTERN.matcher(text)
2730
while (clickMatcher.find()) {
@@ -57,6 +60,9 @@ object CommandParser {
5760
commands.add(Command.TakeScreenshot)
5861
}
5962

63+
// Log the total number of commands found
64+
Log.d(TAG, "Total commands found: ${commands.size}")
65+
6066
return commands
6167
}
6268
}

0 commit comments

Comments
 (0)