fix: Codex 自动压缩不触发 —— 接管时链接模型目录(绝对路径)进 config.toml (hot 1.5.83)

This commit is contained in:
mac
2026-08-16 12:45:32 +08:00
parent e9a261482c
commit 1b687c01e9
50 changed files with 10885 additions and 1161 deletions
+28
View File
@@ -0,0 +1,28 @@
const test = require("node:test");
const assert = require("node:assert/strict");
const fs = require("node:fs");
const path = require("node:path");
const {
clmmResolutionFromParamsV2,
clmmSizeFromParamsV2,
} = require("../electron/lib/canvas.js");
test("keeps Seedance 2K and 4K resolutions for upstream capability negotiation", () => {
assert.equal(clmmResolutionFromParamsV2({ resolution: "2K" }), "2k");
assert.equal(clmmResolutionFromParamsV2({ resolution: "4k" }), "4k");
assert.equal(clmmResolutionFromParamsV2({ resolution: "unsupported" }), "720p");
});
test("derives standard 2K and 4K video sizes from aspect ratio", () => {
assert.equal(clmmSizeFromParamsV2({ ratio: "16:9" }, "2k"), "2560x1440");
assert.equal(clmmSizeFromParamsV2({ ratio: "9:16" }, "2k"), "1440x2560");
assert.equal(clmmSizeFromParamsV2({ ratio: "1:1" }, "4k"), "2160x2160");
});
test("exposes 2K and 4K only on the Seedance video control", () => {
const source = fs.readFileSync(path.resolve(__dirname, "../renderer/app.js"), "utf8");
assert.match(source, /value="2k">2K(需上游支持)/);
assert.match(source, /value="4k">4K(需上游支持)/);
assert.match(source, /const resolutionOptions = isGrok/);
});