fix: stabilize model selection across session boundaries#298
Open
Autumn-Whisper wants to merge 1 commit intoop7418:mainfrom
Open
fix: stabilize model selection across session boundaries#298Autumn-Whisper wants to merge 1 commit intoop7418:mainfrom
Autumn-Whisper wants to merge 1 commit intoop7418:mainfrom
Conversation
- NewChatPage: read initial model/provider from localStorage instead of hardcoded 'sonnet'/'' so new chats inherit the last selection - ChatView: persist model changes to localStorage in handleProviderModelChange so mid-session switches carry over to new chats - NewChatPage: persist model changes to localStorage in onProviderModelChange - MessageInput: gate auto-correction effect on modelsLoaded flag to prevent premature model reset while provider models are still being fetched - useProviderModels: add loaded flag to distinguish "not fetched yet" from "provider has no models" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@Autumn-Whisper is attempting to deploy a commit to the op7418's projects Team on Vercel. A member of the Team first needs to authorize it. |
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
'sonnet'/'',确保新聊天继承用户上次的选择loaded标志,区分"尚未加载"和"Provider 无模型"Root Cause
模型选择状态在 3 个入口(NewChatPage、ChatView、ChatListPanel)之间缺乏统一的 localStorage 同步机制,加上
useProviderModels异步加载期间自动纠正逻辑过早触发,导致用户选择的模型被意外重置。Test plan
npm run test通过(419 tests pass)🤖 Generated with Claude Code