Skip to content

[Feature] 供应商模型列表支持一键清空(搜索时只清除匹配项) #856

Description

@AlphaCatMeow

Affected area

Desktop UI (agent-gui / React)

Problem statement (what should this solve)

从供应商拉取模型列表,经常一下拉回几十上百个模型,真正要用的只有几个。现在删模型只能在每一行点垃圾桶,一次删一个。想换一批模型,或者把搜得到的一整组旧模型删掉,就得连点几十下。

#732 用表头总开关取代了批量选择模式,批量启用、禁用已经一步就能完成,但批量删除还没有入口。

Proposed behavior

  • 在表头(总开关和「已启用 X / 共 Y」那一行)右侧加一个删除按钮,样式和每行的删除按钮一致。
  • 作用范围跟总开关一样:没有搜索词时按钮显示「清空」,删除全部模型;有搜索词时显示「清除匹配项」,只删除当前搜索结果。
  • 点击后先弹确认框,写明要删除几个模型。确认后跟单个删除一样,要保存供应商才生效;直接关掉供应商弹窗则不做任何改动。
  • 列表为空时表头不显示,按钮也跟着隐藏。

Estimated change scope

crates/agent-ui/src/pages/settings/ProviderModal.tsx
crates/agent-ui/src/pages/settings/ProviderModalView.tsx
crates/agent-ui/src/i18n/translations/enUSSettings.ts
crates/agent-ui/src/i18n/translations/zhCNSettings.ts

供应商设置页是 agent-ui 共享组件,桌面端(Windows / macOS / Linux)和 Gateway Web 端都用这一份,不需要分端修改。

Alternatives considered

  • 放在顶部工具栏「刷新模型列表」「手动添加」旁边:窄屏下工具栏已经会换行,而且旁边两个都是添加类操作,删除按钮挨着它们容易误点。
  • 只做「全部清空」,有搜索词时隐藏按钮:作用范围和总开关不一致,也没法按搜索结果成批删除。

Pre-submit checklist

  • I searched existing issues and pull requests and found no duplicates.
  • This proposal is focused on a single feature or improvement.
  • I understand a PR should come after this issue is confirmed by maintainers, otherwise it will be converted to draft.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions