Add Wait command and delayed screenshot handling; sanitize screen-element history to limit verbosity#99
Closed
Android-PowerUser wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
The Wait command feature implementation looks good overall. The changes are well-coordinated across all the necessary files:
- ✅ Command definition added correctly
- ✅ Parser patterns updated with proper regex
- ✅ Execution logic properly handles delays before screenshot
- ✅ UI displays Wait commands correctly
- ✅ Unit test coverage added
The implementation correctly allows delaying screenshot capture, which addresses the stated requirement. No blocking issues 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
Waitcommand and delaying screenshot execution.Description
Command.Wait(seconds: Long)type and parsing support inCommandParserwith a regex and logging, and display the wait command in the UI (PhotoReasoningScreen).ScreenOperatorAccessibilityServicevia apendingScreenshotDelayMillisfield and a newexecuteTakeScreenshotCommand()function that either executes immediately or posts a delayed capture usinghandler.postDelayed, preserving previous screenshot broadcast behavior.PhotoReasoningScreenElementHistoryPolicyto sanitize message lists by marking older "Screen elements:" sections as "no longer relevant" and keep at most three recent relevant sections, and integrate this sanitizer across history builders, mutations, view model API payload construction, saving/loading of chat history, and other relevant places (PhotoReasoningHistoryBuilder,PhotoReasoningMessageMutations,PhotoReasoningViewModel, etc.).testOptions.unitTests.isReturnDefaultValues = trueinapp/build.gradle.kts.PhotoReasoningScreenElementHistoryPolicyTestto verify sanitization behavior and extendCommandParserTestto assertWaitparsing.Testing
./gradlew :app:testDebugUnitTest, and all unit tests includingPhotoReasoningScreenElementHistoryPolicyTestand the extendedCommandParserTestpassed.Codex Task