feat: inline model picker in AI chat composer with per-turn provider attribution#1058
Merged
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…ated, bad endpoint)
…chat steals focus
…, parallel fetch, more SQL prefixes, tests)
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.
Phase 2 of #1047. Inline model picker in the chat composer + per-turn provider attribution stamped on every assistant message. Builds on the
ChatTurn.modelId/ChatTurn.providerIdslots that landed in #1057.What you see
Provider · modelwith the standard cpu icon and a chevron. Click → menu of all configured providers; checkmark on the current selection.This matches Cursor / Zed / Copilot Chat conventions: per-message attribution, picker at the bottom of the composer next to actions.
What's wired
AIChatViewModel.selectedProviderId: UUID?and.selectedModel: String?track the user's choice. Both default tonil, in which caseAIProviderFactory.resolvefalls back to the active provider in settings.AIProviderFactory.resolve(settings:overrideProviderId:overrideModel:)accepts optional overrides. Existingresolve(settings:)callers keep working via default arguments.startStreaming()resolves with the overrides and stamps the assistantChatTurnwithmodelId: resolved.modelandproviderId: resolved.config.id.uuidString.AIChatMessageViewreadsmessage.modelIdand renders it as a small.tertiarybadge in the assistant footer.Persistence
Picker state lives on the view model. Persists for the lifetime of the chat panel session, not across app launches. On restart, the picker resets to the active provider in settings (which is the user's intentional default). Per-conversation persistence is a follow-up if anyone asks.
Out of scope
AIProviderConfigstores one model per entry; switching requires the user to configure additional providers in Settings, same as today).CHANGELOG
Adding under
[Unreleased]->Added.Test plan
modelIdset) — assistant turns render without the attribution badge, no crash.