Spot it. Save it. Free, local-first Chrome extension for images, videos and prompts. Explore 2,000+ curated cases and connect your library to AI Agents via MCP. 提示词导演
JavaScript ai-artai-videochrome-extensionclaude-codecodexhiggsfieldjimenglocal-firstmcpmidjourneymoodboardprompt-engineeringprompt-libraryprompt-managerreference-libraryseedancevisual-bookmarksweb-clipper
import test from "node:test";
import assert from "node:assert/strict";
import {
normalizeAiServiceProfiles,
publicAiServiceProfiles
} from "../extension/ai-service-profiles.js";
test("runtime service profiles are normalized without inventing defaults", () => {
assert.deepEqual(normalizeAiServiceProfiles(), {
gemini: { apiKey: "", model: "" },
xai: {
apiKey: "",
textModel: "",
imageModel: "",
videoModel: "",
mediaConsent: false
}
});
});
test("public runtime profiles expose readiness but never credentials", () => {
const profiles = publicAiServiceProfiles({
gemini: { apiKey: "gemini-secret", model: "video-model" },
xai: {
apiKey: "xai-secret",
textModel: "text-model",
mediaConsent: true
}
});
assert.deepEqual(profiles.gemini, { model: "video-model", configured: true });
assert.deepEqual(profiles.xai, {
textModel: "text-model",
imageModel: "",
videoModel: "",
mediaConsent: true,
configured: true
});
assert.doesNotMatch(JSON.stringify(profiles), /gemini-secret|xai-secret/);
});