refactor(presets): align CCSub to end of partner block across apps

Move the CCSub preset to sit right after DouBaoSeed, at the end of the
partner block and before the first non-partner provider, so its position
is consistent across all six apps:

- Codex / OpenCode: moved up from the 2nd slot (between Shengsuanyun and
  the next partner) to the block tail
- OpenClaw / Hermes: moved up from the aggregator section to the block tail
- Claude / Claude Desktop: already at the block tail

Also add the missing CHANGELOG entry for the CCSub preset, and drop the
provider preset order test that enforced a now-unneeded ordering invariant.
This commit is contained in:
Jason
2026-06-08 23:07:50 +08:00
parent fa17194d84
commit 5beb63e67d
8 changed files with 197 additions and 281 deletions
-85
View File
@@ -1,85 +0,0 @@
import { describe, expect, it } from "vitest";
import { providerPresets } from "@/config/claudeProviderPresets";
import { claudeDesktopProviderPresets } from "@/config/claudeDesktopProviderPresets";
import { codexProviderPresets } from "@/config/codexProviderPresets";
import { opencodeProviderPresets } from "@/config/opencodeProviderPresets";
import { openclawProviderPresets } from "@/config/openclawProviderPresets";
import { hermesProviderPresets } from "@/config/hermesProviderPresets";
const namesOf = (presets: Array<{ name: string }>) =>
presets.map((preset) => preset.name);
const expectInOrder = (names: string[], expected: string[]) => {
const indexes = expected.map((name) => names.indexOf(name));
expect(indexes).not.toContain(-1);
expect(indexes).toEqual(expected.map((_, index) => indexes[0] + index));
};
describe("provider preset order", () => {
it("Claude 预设按合作伙伴优先顺序排列", () => {
expectInOrder(namesOf(providerPresets), [
"Shengsuanyun",
"PatewayAI",
"火山Agentplan",
"BytePlus",
"DouBaoSeed",
]);
});
it("Claude Desktop 预设按合作伙伴优先顺序排列", () => {
expectInOrder(namesOf(claudeDesktopProviderPresets), [
"Shengsuanyun",
"PatewayAI",
"火山Agentplan",
"BytePlus",
"DouBaoSeed",
]);
});
it("Claude Desktop 预设包含官方登录入口", () => {
expect(claudeDesktopProviderPresets[0]).toMatchObject({
name: "Claude Desktop Official",
category: "official",
baseUrl: "",
mode: "direct",
});
});
it("Codex 预设按合作伙伴优先顺序排列", () => {
expectInOrder(namesOf(codexProviderPresets), [
"Shengsuanyun",
"PatewayAI",
"火山Agentplan",
"BytePlus",
"DouBaoSeed",
]);
});
it("OpenCode 预设把火山、BytePlus、DouBaoSeed 放在胜算云后面", () => {
expectInOrder(namesOf(opencodeProviderPresets), [
"Shengsuanyun",
"火山Agentplan",
"BytePlus",
"DouBaoSeed",
]);
});
it("OpenClaw 预设把火山、BytePlus、DouBaoSeed 放在胜算云后面", () => {
expectInOrder(namesOf(openclawProviderPresets), [
"Shengsuanyun",
"火山Agentplan",
"BytePlus",
"DouBaoSeed",
]);
});
it("Hermes 预设把火山、BytePlus、DouBaoSeed 放在胜算云后面", () => {
expectInOrder(namesOf(hermesProviderPresets), [
"Shengsuanyun",
"火山Agentplan",
"BytePlus",
"DouBaoSeed",
]);
});
});