This branch snapshots the in-progress desktop workspace so GitHub-hosted Windows and Linux runners can package the same source tree that already passes local verification on macOS. Constraint: Local Apple Silicon Docker/Wine packaging crashes before Windows artifacts are produced Rejected: Publish from the incomplete base repo state | remote typecheck failed because current source additions were missing Confidence: medium Scope-risk: broad Directive: Treat this branch as a build snapshot only; do not merge it without reviewing the unrelated workspace changes it contains Tested: local typecheck, lint, workspace typecheck, unit tests, integration tests, e2e smoke, macOS signed release upload Not-tested: Native Windows/Linux artifacts before this CI run
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { buildConnectorSection } from "@main/prompt-builder/skill-injection";
|
|
|
|
describe("buildConnectorSection", () => {
|
|
it("includes enabled model pools for ready connectors", () => {
|
|
const section = buildConnectorSection({
|
|
allConnectors: [
|
|
{
|
|
id: "codex_local",
|
|
label: "Codex",
|
|
status: "ready",
|
|
enabledModels: ["gpt-5.4", "gpt-5.4-mini"],
|
|
},
|
|
],
|
|
});
|
|
|
|
expect(section).toContain("Enabled models: gpt-5.4, gpt-5.4-mini.");
|
|
expect(section).toContain("choose from the enabled model pool");
|
|
});
|
|
|
|
it("does not render disabled models in the connector section", () => {
|
|
const section = buildConnectorSection({
|
|
allConnectors: [
|
|
{
|
|
id: "codex_local",
|
|
label: "Codex",
|
|
status: "ready",
|
|
enabledModels: ["gpt-5.4"],
|
|
},
|
|
],
|
|
});
|
|
|
|
expect(section).toContain("Enabled models: gpt-5.4.");
|
|
expect(section).not.toContain("gpt-5.4-mini");
|
|
});
|
|
|
|
it("omits ready connectors whose enabled pool is empty", () => {
|
|
const section = buildConnectorSection({
|
|
allConnectors: [
|
|
{
|
|
id: "codex_local",
|
|
label: "Codex",
|
|
status: "ready",
|
|
enabledModels: [],
|
|
},
|
|
],
|
|
});
|
|
|
|
expect(section).toBeNull();
|
|
});
|
|
});
|