Repository navigation
Conversation
This branch has not been deployed
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.
Issue: #1266
What and why / 改了什么、为什么
#1266 第一步:支持在「设置 → 模型」里调整模型上游的显示顺序(模型内部排序留到下一个 PR)。
ModelProviders新增reorder(List<String> ids)和models.providers.ordered标记:持久化上游顺序到models.providers,启用列表、代理模型列表、默认/辅助/生图模型下拉和设置导入导出都会沿用这个顺序。···菜单(同时支持右键菜单),提供「置顶 / 上移 / 下移」以及拖拽插入指示线。只有单个上游或内置 Claude Code 行不显示排序控件。How it was tested / 怎么测的
test/models/models_test.dart:覆盖reorder的持久化、边界输入(单条/重复/未知/缺省 id)以及enabled、proxyModelRefs顺序。test/settings/models_page_test.dart:覆盖单条隐藏控件、···菜单移动与首尾禁用、macOS 拖拽排序及点击进入详情、手动排序覆盖推荐上游/magpie 默认置顶。dart format --output=none --set-exit-if-changed(变更的 Dart 文件)flutter analyze --fatal-infosflutter test test/models/models_test.dart test/models/kernel_models_test.dart test/settings/models_page_test.dart test/settings/upstream_import_test.dart(155 passed)Checklist / 检查
dart format,flutter analyzeand the related tests pass.dart format、flutter analyze和相关测试通过。