Use completed() command for automatic screenshot flow#119
Open
Android-PowerUser wants to merge 1 commit into
Open
Use completed() command for automatic screenshot flow#119Android-PowerUser wants to merge 1 commit into
completed() command for automatic screenshot flow#119Android-PowerUser wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
The implementation of the completed() command is well-structured and comprehensive. All changes correctly integrate the new command across the application stack - from command parsing and execution to UI display and testing. The code functions correctly with no defects found.
You can now have the agent implement changes and create commits directly on your pull request's source branch. Simply comment with /q followed by your request in natural language to ask the agent to make changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
takeScreenshot()requirement with acompleted()signal so the AI can stop automatic screenshot requests when the task is finished.completed()is present.Description
Command.Completedto the command sealed class and makecompleted()detectable by the parser and single-instance guarded inCommandParser.PhotoReasoningCommandProcessingto reporthasCompletedCommand, and updatePhotoReasoningViewModelto automatically append aTakeScreenshotfor final execution when neithercompleted()nor an explicittakeScreenshot()is present, while treatingcompleted()as a termination marker (no accessibility action).completed()is encountered during streaming and do not dispatch it to accessibility (no-op inScreenOperatorAccessibilityService).SystemMessagePreferencesto instruct use ofcompleted()and to reflect the new behavior "After each message... Saycompleted()when the task is finished.".completed()in the detected-commands UI and add unit tests to covercompleted()parsing inCommandParserTest.Testing
./gradlew :app:compileDebugKotlinand the build completed successfully (BUILD SUCCESSFUL).app/src/test/java/com/google/ai/sample/util/CommandParserTest.ktforcompleted()parsing; these tests were added but not executed in this compile step.Codex Task