feat: add reasoning effort picker to session screen (#47)#51
Open
dzianisv wants to merge 2 commits into
Open
Conversation
- New Session modal now shows: - Current project as tappable row (tap to create session immediately) - Recent Projects section: list of previously used dirs as tappable rows - Server Projects section: projects known to opencode server (from /project API) - Manual path input as fallback (unchanged behavior) - Modal body is now scrollable to handle long lists - All selection paths call addRecentDirectory to keep recents up to date - TypeScript clean (pre-existing VariantPicker.tsx error unrelated)
- Add VariantPicker bottom sheet component (low/medium/high/auto) - Add variant state to catalog store, reset on model change - Pass variant through sendMessage -> sdk.session.prompt() - Add reasoning chip to toolbar, shown only for models with variants - Parse model.variants from provider API response in catalog and sdk types API field: variant in POST /session/:id/prompt_async Server maps variant -> reasoningEffort via model variant config
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
Closes #47
Adds a reasoning effort selector to the session/chat screen alongside the existing model picker.
What changed
src/lib/sdk.tsvariantsto provider model typesrc/stores/catalog.tsvariantstoProviderModel, addedvariant/setVariantto catalog state, reset variant on model changesrc/stores/sessions.tsvariantparam tosendMessage, passed tosdk.session.prompt()src/components/chat/VariantPicker.tsxsrc/components/chat/index.tsapp/session/[id].tsxAPI field used
variantinPOST /session/:sessionID/prompt_async.The opencode server maps the variant name to the model's configured
reasoningEffortvalue (e.g.variant: "high"→{ reasoningEffort: "high" }). Models expose their supported variants via the/providerendpoint.UX