implementation of issue #257 - support for user-selectable Gemini AI models and customizable system prompts#258
Merged
theovilardo merged 5 commits intotheovilardo:masterfrom Oct 15, 2025
Conversation
Expanded the SystemPromptDialog bottom sheet to full height in SettingsScreen. Refactored SettingsViewModel to observe playerThemePreference changes and added methods for setting nav bar and carousel styles. Cleaned up code formatting and removed redundant closing brackets.
Added immediate reset of the edited prompt to the default value when 'Reset' is clicked. Enhanced save action to show a toast notification and smoothly dismiss the dialog using coroutine scope for better user experience.
Introduces a floating clear button to the system prompt text field in SettingsScreen, allowing users to quickly clear the prompt. Also refactors prompt construction order in AiPlaylistGenerator for improved clarity.
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.
This pull request introduces support for user-selectable Gemini AI models and customizable system prompts in the app's AI-powered playlist and metadata generation features. Link to the issue It also adds a new service for fetching available Gemini models using the user's API key, updates user preferences to store model and prompt selections, and enhances the settings UI to allow users to choose their preferred model and system prompt.
AI Model Selection and Customization:
GeminiModelServiceto fetch available Gemini models from the Gemini API using the user's API key, with fallback to default models if the fetch fails. (app/src/main/java/com/theveloper/pixelplay/data/ai/GeminiModelService.kt)UserPreferencesRepositoryto store and retrieve the selected Gemini model and custom system prompt, including methods for setting, getting, and resetting these preferences. (app/src/main/java/com/theveloper/pixelplay/data/preferences/UserPreferencesRepository.kt)Integration with AI Generators:
AiPlaylistGeneratorandAiMetadataGeneratorto use the selected Gemini model from user preferences instead of hardcoding the model name, and to incorporate the custom system prompt into the playlist creation prompt. (app/src/main/java/com/theveloper/pixelplay/data/ai/AiPlaylistGenerator.kt,app/src/main/java/com/theveloper/pixelplay/data/ai/AiMetadataGenerator.kt)Settings Screen Enhancements:
app/src/main/java/com/theveloper/pixelplay/presentation/screens/SettingsScreen.kt)