refactor(settings): 供应商模型列表用表头总开关取代批量选择模式 - #733
Open
AlphaCatMeow wants to merge 1 commit into
Open
Conversation
原交互需要 进入批量选择 -> 全部选中 -> 移到底部点启用 -> 点完成 四步。 现在列表头常驻一个总开关,一次点击即可启用/禁用当前可见(含搜索过滤) 的全部模型,同时显示已启用数量;逐个启用仍用每行原有开关。 - 删除批量选择模式及其全选/清空行、底部操作条 - 移除 getModelBulkActionCounts/applyModelBulkActiveState, 新增更简单的 applyModelsActiveState - 拖拽排序不再受批量模式限制,仅搜索过滤时禁用 - i18n 新增 enable/disableAllModels 与启用计数文案, 删除 modelReorderDisabledBulk
StackCairn
marked this pull request as draft
September 2, 2026 12:00
Contributor
|
PR governance checks passed. Awaiting human review. |
AlphaCatMeow
marked this pull request as ready for review
September 2, 2026 12:01
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.
Linked issue
Closes #732
Summary
供应商模型列表原来要一次启用全部模型,需要「进入批量选择 → 全选 → 滚到底部点启用 → 点完成」四步;本 PR 把批量选择模式整个删掉,改为列表表头常驻一个总开关:一次点击启用/禁用当前可见(含搜索过滤结果)的全部模型,旁边显示已启用数量。逐个启用仍用每行原有开关。拖拽排序不再受批量模式限制,仅在搜索过滤时禁用。
实现上删除了批量选择模式的独立状态、全选/清空行和底部操作条,移除
getModelBulkActionCounts/applyModelBulkActiveState,新增更简单的applyModelsActiveState;i18n 新增 enable/disableAllModels 与启用计数文案,删除modelReorderDisabledBulk。净变化 +70 / -260 行。Change scope
crates/agent-ui/src/pages/settings/ProviderModal.tsxcrates/agent-ui/src/pages/settings/ProviderModalView.tsxcrates/agent-ui/src/pages/settings/providerUtils.tscrates/agent-ui/src/i18n/translations/enUSSettings.ts、zhCNSettings.tscrates/agent-gui/test/settings/provider-models-fetch.test.mjsScreenshots / preview
Verification
node --test test/settings/provider-models-fetch.test.mjs:23 个用例全部通过(断言已随新交互更新)。pnpm tauri dev)人工验证:表头总开关一次启用/禁用全部模型、搜索过滤时只作用于过滤结果、每行开关行为不变、拖拽排序仅在搜索过滤时禁用。test/settings/provider-usage-query-form.test.mjs的「preset 脚本与 Rust 内置逐字节一致」在 upstream/main(7d6e95e8)上同样失败,非本 PR 引入。git merge-tree检查通过)。Pre-submit checklist