mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-06-16 13:34:04 +08:00
3c3d417457
* Enable Codex goals in provider templates * feat: add Codex goal mode toggle - Remove forced goals=true from Codex provider presets and custom templates. - Add a Codex provider editor switch that updates [features].goals on demand. - Update docs, i18n, and regression coverage for the optional Goal mode flow. --------- Co-authored-by: Jason <farion1231@gmail.com>
18 lines
656 B
TypeScript
18 lines
656 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { parse as parseToml } from "smol-toml";
|
|
import { getCodexCustomTemplate } from "@/config/codexTemplates";
|
|
|
|
describe("Codex custom templates", () => {
|
|
it("does not force Codex Goal mode in the custom provider template", () => {
|
|
const template = getCodexCustomTemplate();
|
|
const parsed = parseToml(template.config) as {
|
|
features?: { goals?: boolean };
|
|
model_providers?: Record<string, unknown>;
|
|
};
|
|
|
|
expect(template.auth).toEqual({ OPENAI_API_KEY: "" });
|
|
expect(parsed.features?.goals).toBeUndefined();
|
|
expect(parsed.model_providers?.custom).toBeDefined();
|
|
});
|
|
});
|