diff --git a/packages/client/ui-settings-models/README.i18n.yaml b/packages/client/ui-settings-models/README.i18n.yaml index 8dcae71776..cc8f8a2981 100644 --- a/packages/client/ui-settings-models/README.i18n.yaml +++ b/packages/client/ui-settings-models/README.i18n.yaml @@ -2,5 +2,5 @@ # side as of the last confirmed-consistent state. Both languages carry equal authority; # after editing either side, bring the other along and re-record with: # pnpm run verify-translation-pairing --write packages/client/ui-settings-models/README.md -README.md: e0accf787aba9d2857887773b4f1a3d703fc1fc1 -README.zh.md: 39b443c2293a9da0f7a82bc70d10539a2d153aa8 +README.md: 0d6f34436f11eadd84ff1c2d6a7731aee1a42f32 +README.zh.md: f28744f46eda015528553e1b363e1427d2b927ae diff --git a/packages/client/ui-settings-models/README.md b/packages/client/ui-settings-models/README.md index e0accf787a..0d6f34436f 100644 --- a/packages/client/ui-settings-models/README.md +++ b/packages/client/ui-settings-models/README.md @@ -25,7 +25,7 @@ English | [中文](README.zh.md) ## Use this package -Open the Models page from the Settings navigation to see every configured provider as a row. A whole-section provider whose key is not configured anywhere renders as its open setup card instead, but only in the first-run posture and only until the user closes that card. Each card kind owns its own open state, so closing one never discards a draft in another. +Open the Models page from the Settings navigation to see every configured provider as a row. The official DeepSeek provider (`deepseek-official`) always appears first; other providers retain their directory order. A whole-section provider whose key is not configured anywhere renders as its open setup card instead, but only in the first-run posture and only until the user closes that card. Each card kind owns its own open state, so closing one never discards a draft in another. A provider with a stored catalog error remains visible with its diagnostic and edit/delete actions. Add actions are offered only for registered settings namespaces, so an unavailable namespace cannot leave a button that opens no editor. A rejected save leaves the editor open and displays the Host diagnostic. diff --git a/packages/client/ui-settings-models/README.zh.md b/packages/client/ui-settings-models/README.zh.md index 39b443c229..f28744f46e 100644 --- a/packages/client/ui-settings-models/README.zh.md +++ b/packages/client/ui-settings-models/README.zh.md @@ -25,7 +25,7 @@ kind: "package-reference" ## 使用本包 -从设置导航打开 Models 页面,即可看到每个已配置的提供商都有一行。其配置键未在任何位置配置的整分节提供商会渲染为其展开的设置卡片而非一行,但仅限首次运行姿态,且仅持续到用户关闭该卡片为止。每一类卡片各自持有自己的展开状态,因此关掉其中一张绝不会丢弃另一张里的草稿。 +从设置导航打开 Models 页面,即可看到每个已配置的提供商都有一行。官方 DeepSeek 提供商(`deepseek-official`)始终排在第一位,其他提供商保持目录中的原有顺序。其配置键未在任何位置配置的整分节提供商会渲染为其展开的设置卡片而非一行,但仅限首次运行姿态,且仅持续到用户关闭该卡片为止。每一类卡片各自持有自己的展开状态,因此关掉其中一张绝不会丢弃另一张里的草稿。 存在已存储目录错误的提供商仍显示诊断以及编辑、删除入口。添加操作只面向已注册的 settings 命名空间,因此不可用的命名空间不会留下无法打开编辑器的按钮。保存被拒绝时,编辑器保持打开并展示 Host 诊断。 diff --git a/packages/client/ui-settings-models/src/client/ModelsSection.tsx b/packages/client/ui-settings-models/src/client/ModelsSection.tsx index 7ae8118762..d5743645b2 100644 --- a/packages/client/ui-settings-models/src/client/ModelsSection.tsx +++ b/packages/client/ui-settings-models/src/client/ModelsSection.tsx @@ -1,7 +1,8 @@ /** * Models settings section: the provider rows joined from the configurable * directory, settings namespaces, and credential states, with one editor - * card at a time. Rows expose only confirmed API-key state through accessible + * card at a time. The official DeepSeek provider appears first; other rows + * retain directory order. Rows expose only confirmed API-key state through accessible * solid configured or missing dots. A whole-section provider without a * configured key renders as its open setup card instead of a row, but only in * the first-run posture — no provider on the page can serve requests yet — and @@ -335,7 +336,9 @@ function Loaded({ injected, renderSlot }: { injected: ModelsSectionFace; renderS // One fact decides both first-run postures on this page and the onboarding // step: whether the user already has a provider to talk to. const anyUsable = state.rows.some(providerUsable) - const configured = state.rows.filter(row => row.configured) + const configured = state.rows.filter(row => row.configured).sort((left, right) => ( + Number(right.entry.provider === 'deepseek-official') - Number(left.entry.provider === 'deepseek-official') + )) const configurable = state.rows.filter(row => state.namespaces.has(row.entry.settingsNs)) const addable: AddableRow[] = state.rows.flatMap((row) => { const namespace = state.namespaces.get(row.entry.settingsNs)