Add preferred_language pref and route mood shifts to steer_session - #92
Merged
Conversation
- Add Settings.preferred_language (list[str] | None); accept comma-separated string or list, drop empties. Surface in sanitized() output. - Surface preferred_languages in the playlist-selection Context only, where candidate playlist names/descriptions are visible. The session planner search term stays clean of language qualifiers to avoid polluting retrieval (which previously produced corrupted terms like 'maintanin'). - playlist_selection.txt: prefer playlists matching preferred_languages, with an explicit per-request language override (k-pop, spanish pop) taking precedence over the default. - resolver.txt: broaden steer_session to cover mood/energy/direction shifts on an active session so a vibe change routes to steer_session with search_update mode replace instead of regenerating the queue via play_session. Refs #91
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
Fixes #91.
Two related fixes for session-steering behavior and music language preference.
1. Music language preference (config + playlist selection)
Adds a
preferred_languageconfig setting (list[str] | None) that biases playlist selection toward the user's preferred language(s) without polluting the Apple Music search term.preferred_languageaccepts a comma-separated string ("english, spanish") or a list; empty entries are dropped.playlist_selection.txtprefers playlists matchingpreferred_languages, with an explicit per-request language override (e.g. "k-pop", "spanish pop") taking precedence over the default.2. Steer on mood/energy shift (resolver prompt)
Tightened
resolver.txtso that a mood/energy/direction shift on an active session routes tosteer_sessionwithsearch_update {"mode": "replace"}instead ofplay_session, which was causing the same queue to regenerate on repeated steering attempts (e.g. "switch to something upbeat" was starting a new session rather than steering).Test commands run
All 250 tests pass.
To activate
Add to your config file:
{ "preferred_language": ["english"] }or
export VESPER_PREFERRED_LANGUAGE="english", then restart the service.