fix(release): 正式版本 - 修复 SSRF 与 Quality checks,发布 v1.6.6.1

This commit is contained in:
ddcat666 committed 2026-10-13 12:55:30 +08:00
1 parent ede6cc1e70
commit ea6676f449
21 files changed
+1303 -338

No files matched your search

+10 -3
View File
@@ -59,7 +59,10 @@ test("candidate rows do not disguise missing prices as zero", () => {
test("model rows preserve multiple promotional labels and colors without altering prices", () => {
const config = fixture();
config.channels[0].modelCosts![0].tags = [{ text: "限时特价", color: "purple" }, { text: "官方1折", color: "gold" }];
config.channels[0].modelCosts![0].tags = [
{ text: "限时特价", color: "purple" },
{ text: "官方1折", color: "gold" },
];
for (const theme of [canvasThemes.light, canvasThemes.dark]) {
const markup = renderToStaticMarkup(<ModelLabel config={config} model={config.model} capability="video" theme={theme} creationVariant showConfiguredModelName={false} showPrice showDescription />);
expect(markup).toContain('data-color="purple">限时特价');
@@ -68,7 +71,8 @@ test("model rows preserve multiple promotional labels and colors without alterin
}
config.channels[0].modelCosts![0].tags = [];
const markup = renderToStaticMarkup(<ModelLabel config={config} model={config.model} capability="video" theme={canvasThemes.light} showDescription />);
expect(markup).not.toContain('aria-label="模型标签"');
expect(markup).not.toContain("限时特价");
expect(markup).not.toContain("官方1折");
});
test("video capability tag is derived from limits and precedes editable model tags", () => {
@@ -76,7 +80,10 @@ test("video capability tag is derived from limits and precedes editable model ta
const cost = config.channels[0].modelCosts![0];
cost.capabilityConfig = defaultModelCapabilityConfig();
Object.assign(cost.capabilityConfig.video!.references, { maxImages: 30, maxVideos: 10, maxAudios: 10 });
cost.tags = [{ text: "限时特价", color: "purple" }, { text: "按次收费", color: "blue" }];
cost.tags = [
{ text: "限时特价", color: "purple" },
{ text: "按次收费", color: "blue" },
];
const markup = renderToStaticMarkup(<ModelLabel config={config} model={config.model} capability="video" theme={canvasThemes.light} creationVariant showConfiguredModelName={false} showPrice showDescription />);