The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.
TypeScript ai-videocomfyuicreative-toolsgenerative-aiideogramimage-generationimage-to-3dimage-to-videoltx-videominimax-h3nextjsopen-sourceopen-weightsqwen-imagetext-to-imagevideo-generationwan
Fixes 5: messages name Settings sections that exist
Claude95c9f5982202
diff --git a/src/server/assist/agent.ts b/src/server/assist/agent.tsindex 1117496a..799c0d8e 100644--- a/src/server/assist/agent.ts+++ b/src/server/assist/agent.ts@@ -432,7 +432,7 @@ export async function resolveMode(choice?: Partial<AssistModeChoice>): Promise<Rconst agent = await resolveAgent();return { mode: agent === "claude" ? "smart" : "free", agent, model: null, effort: null };}- const noKey = "Smart and Claude need an Anthropic API key (Settings → API keys) — using Free instead.";+ const noKey = "Smart and Claude need an Anthropic API key (Settings → Prompt enhancement) — using Free instead.";if (choice.mode === "smart") return claudeAllowed() ? { mode: "smart", agent: "claude", model: DEFAULT_CLAUDE_MODEL, effort: DEFAULT_EFFORT } : free(noKey);if (choice.mode === "free") return free();// Manual@@ -1325,7 +1325,7 @@ function refreshFlags(s: State): void {}function errorText(e: unknown): string {- if (e instanceof Anthropic.AuthenticationError) return "Your Anthropic API key was rejected. Check it in Settings → API keys.";+ if (e instanceof Anthropic.AuthenticationError) return "Your Anthropic API key was rejected. Check it in Settings → Prompt enhancement.";if (e instanceof Anthropic.RateLimitError) return "Claude is rate-limited right now. Try again in a minute.";if (e instanceof Anthropic.BadRequestError && /\bmcp\b|connector/i.test(e.message)) return `A connector didn't work: ${e.message}. Check it in Settings → Assist connectors, or switch it off.`;if (e instanceof Anthropic.APIError) return `Claude returned an error (${e.status ?? "network"}): ${e.message}`;diff --git a/src/server/content-factory.ts b/src/server/content-factory.tsindex eb9b7584..544adb34 100644--- a/src/server/content-factory.ts+++ b/src/server/content-factory.ts@@ -436,7 +436,7 @@ async function writeBrief(id: string): Promise<void> {: `The clip couldn't be read (${framesGen?.error ?? wordsGen?.error ?? "no frames or words came back"}). This brief comes from its shape and length — read it again to retry.`;} else if (!llmTextBackend()) {offline = true;- note = "No LLM is connected (Settings → AI helper), so this brief comes from the clip's shape, length and narration pace.";+ note = "No LLM is connected (Settings → Prompt enhancement), so this brief comes from the clip's shape, length and narration pace.";} else {const transcript = cues.map((c) => `[${mmss(c.start)}] ${c.text.trim()}`).join("\n");const user = briefRequest({ seconds: ref.seconds, width: ref.width, height: ref.height, frames: frames.length, transcript, title: ref.title });diff --git a/src/server/evolution.ts b/src/server/evolution.tsindex 238ad98a..3a49a36b 100644--- a/src/server/evolution.ts+++ b/src/server/evolution.ts@@ -142,7 +142,7 @@ export async function writeDirection(body: z.infer<typeof DirectionSchema>): Proif (!textModel || !offeredModel(textModel)) return offline(`the text model is switched off in ${ACCESS_PLACE}`);const backend = llmTextBackend();const ollama = backend === "ollama" || (backend === "claude" && body.engine === "open");- if (!backend) return offline("no text model is set up (Settings → AI helper)");+ if (!backend) return offline("no text model is set up (Settings → Prompt enhancement)");if (ollama && !(await probeOllama())) return offline("Ollama isn't running");const max = EVOLUTION.llmReferences[body.engine];const frame = body.frame ? [{ data: Buffer.from(body.frame.split(",")[1], "base64"), contentType: body.frame.slice(5, body.frame.indexOf(";")) }] : [];diff --git a/src/server/genjutsu.ts b/src/server/genjutsu.tsindex a42a3158..ff01d460 100644--- a/src/server/genjutsu.ts+++ b/src/server/genjutsu.ts@@ -391,7 +391,7 @@ function mixProblem(modes: StepMode[], cannot: boolean, input: GenjutsuPlanInputconst both = ownIds.filter((id) => helperIds.includes(id));const key = !own.length ? `a ${label(helperIds)} key` : !helpers.length ? `a ${label(ownIds)} key` : both.length ? `a ${label(both.slice(0, 1))} key` : `a ${label(helperIds)} key and a ${label(ownIds)} key`;const around = own.length ? otherModel(input) : undefined;- return `${parts.join(", and ")} — add ${key} in Settings → API keys${around ? `, or ${around}` : ""}`;+ return `${parts.join(", and ")} — add ${key} in Settings → Paid API configuration${around ? `, or ${around}` : ""}`;}/** Another model for the same job that runs with the keys set now (the way around a missing key). */@@ -534,7 +534,7 @@ export async function describeCharacter(body: z.infer<typeof DescribeSchema>): Pconst backend = llmTextBackend();const ollama = backend === "ollama" || (backend === "claude" && body.engine === "open");if (getSetting("demoMode") === "on" || !backend || (ollama && !(await probeOllama()))) {- throw new ShortsError("Describing needs a text model: add an Anthropic key, or run Ollama with a vision model (Settings → AI helper)", 422);+ throw new ShortsError("Describing needs a text model: add an Anthropic key, or run Ollama with a vision model (Settings → Prompt enhancement)", 422);}let file: Awaited<ReturnType<typeof readRef>>;try {diff --git a/src/server/providers/llm.ts b/src/server/providers/llm.tsindex c6a880b5..89bcb04c 100644--- a/src/server/providers/llm.ts+++ b/src/server/providers/llm.ts@@ -184,7 +184,7 @@ async function viaClaude(system: string, user: string, signal: AbortSignal): Pro{ signal },)) as Anthropic.Beta.BetaMessage;} catch (e) {- if (e instanceof Anthropic.AuthenticationError) throw new Error("Your Anthropic API key was rejected. Check it in Settings → API keys.");+ if (e instanceof Anthropic.AuthenticationError) throw new Error("Your Anthropic API key was rejected. Check it in Settings → Prompt enhancement.");if (e instanceof Anthropic.RateLimitError) throw new Error("Claude is rate-limited right now. Try again in a minute.");if (e instanceof Anthropic.APIError) throw new Error(`Claude returned an error (${e.status ?? "network"}): ${e.message}`);throw e;diff --git a/tests/genjutsu-api.test.ts b/tests/genjutsu-api.test.tsindex 89938ba4..0449adf1 100644--- a/tests/genjutsu-api.test.ts+++ b/tests/genjutsu-api.test.ts@@ -159,7 +159,7 @@ describe("Genjutsu: estimates", () => {setSetting("replicateToken", "r8_test");const whole = await (await estimateRoute.POST(json(body({ mode: "character", modelId: "p-video-replace", source: { url: clip, ...src } })))).json();expect(whole).toMatchObject({ modelId: "p-video-replace", source: "partner", steps: 1, demo: false, providers: ["replicate"] });- expect(await say(body({ mode: "character", modelId: "p-video-replace", source: { url: clip, ...src }, range: { start: 0, end: 10 } }))).toBe("Cutting the clip runs on fal.ai — add a fal.ai key in Settings → API keys");+ expect(await say(body({ mode: "character", modelId: "p-video-replace", source: { url: clip, ...src }, range: { start: 0, end: 10 } }))).toBe("Cutting the clip runs on fal.ai — add a fal.ai key in Settings → Paid API configuration");// Starting it is refused the same way, and nothing is made.const before = (db().prepare("SELECT COUNT(*) AS n FROM generations").get() as { n: number }).n;expect(await say(body({ mode: "character", modelId: "p-video-replace", source: { url: clip }, range: { start: 0, end: 10 } }), createRoute)).toMatch(/^Cutting the clip runs on fal\.ai/);@@ -169,7 +169,7 @@ describe("Genjutsu: estimates", () => {it("demo mode off and no keys: the key it needs, in words", async () => {setSetting("demoMode", "off");- expect(await say(body({ source: { url: clip, ...src } }))).toBe("Fuobe Genjutsu Lite · Motion runs on fal.ai, and putting the sound back runs on fal.ai — add a fal.ai key in Settings → API keys");+ expect(await say(body({ source: { url: clip, ...src } }))).toBe("Fuobe Genjutsu Lite · Motion runs on fal.ai, and putting the sound back runs on fal.ai — add a fal.ai key in Settings → Paid API configuration");setSetting("demoMode", "auto");});});diff --git a/tests/settings-links.test.ts b/tests/settings-links.test.tsindex 8b26eac4..cae146ea 100644--- a/tests/settings-links.test.ts+++ b/tests/settings-links.test.ts@@ -17,6 +17,25 @@ describe("Settings deep links", () => {for (const l of links) expect(anchors.has(l.id), `${l.file} links to /settings#${l.id}`).toBe(true);});+ it("every \"Settings → …\" the app tells people names a section or field Settings has", () => {+ // Section titles ("Prompt enhancement · Claude or Ollama": the whole, or either side of the "·") and field labels.+ const titles = [...form.matchAll(/\btitle="([^"]+)"/g)].map((m) => m[1]);+ const labels = [...form.matchAll(/\blabel="([^"]+)"/g)].map((m) => m[1]);+ const norm = (x: string) => x.replace(/&/g, "&").replace(/\s*·\s*/g, " ").toLowerCase();+ const names = [...titles, ...titles.flatMap((t) => t.split("·").map((x) => x.trim())), ...labels].map(norm);+ const places = files(root).flatMap((f) =>+ fs+ .readFileSync(f, "utf8")+ .split("\n")+ // What people read, not the comments around it.+ .filter((l) => !/^\s*(\/\/|\*|\/\*)/.test(l))+ .flatMap((l) => [...l.replace(/&/g, "&").matchAll(/Settings → ([^`"'.,;:()${}<]+)/g)].map((m) => ({ file: path.relative(root, f), place: m[1].trim() }))),+ );+ expect(places.length).toBeGreaterThan(20);+ const unknown = places.filter((p) => p.place && !names.some((n) => norm(p.place) === n || norm(p.place).startsWith(`${n} `)));+ expect(unknown.map((p) => `${p.file}: Settings → ${p.place}`)).toEqual([]);+ });+it("the AI-Toolkit URL the training messages ask for has its field, with Save & test", () => {const section = form.slice(form.indexOf('id="training"'), form.indexOf("</Section>", form.indexOf('id="training"')));expect(section).toMatch(/name="aiToolkitUrl"[\s\S]*provider="ai-toolkit"/);