Carry the composer's model pick to new sessions - #33
Closed
emircan-sahin wants to merge 1 commit into
Closed
Conversation
The model picker in the composer only updated the session it was opened from. `monocode.lastModel` was written solely by Settings -> Providers, so `defaultSessionChoice()` kept falling back to the built-in default and every new session started on Composer or Pi regardless of what you had been working in. Persist the pick from `onModelChange` too, matching what the effort controls beside it already do via `saveLastModelSettings`. Fixes hardbeat920#30
3 tasks
Owner
|
Thanks for the contribution @emircan-sahin ! I’d like new sessions to keep using the default explicitly chosen in Settings. With this change, selecting a model for an individual chat silently replaces that default, which could be surprising. |
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.
What changed
onModelChangenow callssaveLastModelChoice(harness, resolved.id), so switching model from the composer's picker also updates the default new sessions start with.Why
Fixes #30.
monocode.lastModelwas written only by Settings → Providers (SettingsView.tsx). The composer picker updated just the session it was opened from, sodefaultSessionChoice()kept reading a stale (or absent) choice and fell back to the hardcoded"cursor"provider — every new session started on Composer regardless of what the user had actually been working in.The effort/thinking chips sitting next to the picker already do the analogous thing (
onModelSettingsChange→saveLastModelSettings), which is why effort was sticky and model was not. This just closes that gap.saveLastModelChoicealso writes through todefaultModels[harness], so the per-provider default in Settings tracks the picker too.UI
No visual change.
Checklist
npm run check