AI media harness for planning, generating, and editing locally
TypeScript
Tidy settings
Bitti5c25f9149bc2
diff --git a/src/components/SettingsView.test.tsx b/src/components/SettingsView.test.tsxindex 220e5d3..5a17b2b 100644--- a/src/components/SettingsView.test.tsx+++ b/src/components/SettingsView.test.tsx@@ -62,16 +62,22 @@ describe("the settings screen", () => {expect(within(tab("Video engine")).getByText("4")).toBeTruthy();});- it("says none of the prose that used to explain what this computer means", () => {+ it("keeps the settings header short", () => {const { container } = open();for (const gone of ["belongs to this computer", "stays behind when", "needs the model files", "ships with the app"]) {expect(container.textContent, gone).not.toContain(gone);}- // What replaced it: the title, the tabs, and each field saying its own job.- expect(screen.getByRole("heading", { name: "This computer" })).toBeTruthy();+ expect(screen.queryByText("This computer")).toBeNull();+ expect(screen.getByRole("heading", { name: "Settings" })).toBeTruthy();expect(screen.getByText("Reads your prompt so the transformer can act on it.")).toBeTruthy();});+ it("puts the optional tokenizer setting last", () => {+ const { container } = open();+ const labels = Array.from(container.querySelectorAll(".settings-path label b")).map((label) => label.textContent);+ expect(labels.at(-1)).toContain("Tokenizer");+ });+it("offers Clear all paths only beside the paths", () => {open();expect(screen.getByRole("button", { name: /Clear all paths/ })).toBeTruthy();diff --git a/src/components/SettingsView.tsx b/src/components/SettingsView.tsxindex 749f3f0..8a9fb8a 100644--- a/src/components/SettingsView.tsx+++ b/src/components/SettingsView.tsx@@ -159,10 +159,7 @@ export function SettingsView({ onClose }: { onClose: () => void }) {<div className="settings-overlay" role="dialog" aria-modal="true" aria-labelledby="settings-heading"><div className="settings-view"><header className="settings-view__head">- <div>- <p className="eyebrow">Settings</p>- <h1 id="settings-heading">This computer</h1>- </div>+ <h1 id="settings-heading">Settings</h1><button className="icon-button icon-button--strong" onClick={onClose} aria-label="Close settings"><X size={18} /></button></header>diff --git a/src/lib/settings.ts b/src/lib/settings.tsindex fe68577..2468063 100644--- a/src/lib/settings.ts+++ b/src/lib/settings.ts@@ -42,9 +42,9 @@ export interface EnginePathField {export const ENGINE_PATH_FIELDS: EnginePathField[] = [{ id: "transformer", label: "Transformer weights", hint: "The main model that turns your description into moving pictures.", directory: false, extensions: ["safetensors", "gguf", "bin"], required: true },{ id: "textEncoder", label: "Text encoder weights", hint: "Reads your prompt so the transformer can act on it.", directory: false, extensions: ["safetensors", "gguf", "bin"], required: true },- { id: "tokenizer", label: "Tokenizer", hint: "Splits your prompt into pieces the text encoder understands. Usually a folder.", directory: true, extensions: [], required: false },{ id: "videoVae", label: "Video VAE weights", hint: "Turns the model's internal picture into real video frames.", directory: false, extensions: ["safetensors", "gguf", "bin"], required: true },{ id: "audioVae", label: "Audio VAE weights", hint: "Turns the model's internal sound into real audio.", directory: false, extensions: ["safetensors", "gguf", "bin"], required: true },+ { id: "tokenizer", label: "Tokenizer", hint: "Splits your prompt into pieces the text encoder understands. Usually a folder.", directory: true, extensions: [], required: false },];export type EngineSettings = Record<EnginePathId, string>;