Open
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a new optional feature that automatically launches the first matching app when using the LAUNCH command, eliminating the need to manually select from suggestions. The feature is disabled by default and can be toggled in the Settings.
- Added a new Settings toggle for auto-launching the first matching app with the LAUNCH command
- Refactored launch suggestion logic into a reusable function that returns structured data
- Fixed a typo in the Italian translation file that was causing build issues
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Added new string resource for the feature toggle |
| app/src/main/res/values-*/strings.xml | Added translations for the new feature in multiple languages |
| app/src/main/res/layout/activity_settings.xml | Added UI switch for the new feature in Settings |
| app/src/main/java/com/coderGtm/yantra/terminal/Helper.kt | Extracted launch suggestions logic into reusable function |
| app/src/main/java/com/coderGtm/yantra/commands/launch/Helper.kt | Added helper function to find first matching app |
| app/src/main/java/com/coderGtm/yantra/commands/launch/Command.kt | Implemented auto-launch functionality in LAUNCH command |
| app/src/main/java/com/coderGtm/yantra/activities/SettingsActivity.kt | Added settings management for the new feature |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…into feature/launch-first-match # Conflicts: # app/src/main/res/values-es/strings.xml # app/src/main/res/values-it/strings.xml # app/src/main/res/values-ru/strings.xml # app/src/main/res/values-sr/strings.xml # app/src/main/res/values-uk/strings.xml
Contributor
Author
|
Are there any additional changes you'd like me to implement here @coderGtm? |
Owner
|
Sorry @sebastinto but I haven't been able to take a proper look at it yet. Once I have a good look at it, I'll ping you here. |
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.
Summary
This PR adds a new optional feature that allows users to automatically launch the first matching app in the suggestions result when using the
LAUNCHcommand, eliminating the need to manually select from suggestions.Changes
Primary
getLaunchSuggestions()function that returns aLaunchSuggestionsResultdata class for consistencyLAUNCHcommand to support the new featureSecondary
Testing
LAUNCH c-> press the keyboard return key -> first match is launched (in this case the "Contacts" app)LAUNCH c-> press the keyboard return key -> error message displayed'c' app not found. Try using 'list apps' to get list of all app names.