fix(web): 音频与角色素材 - 修正格式检查未通过的代码风格

角色库、音频参数和音频测试在上次提交后不再符合 Prettier,质量检查因此失败。只调整格式,不改变交互。
This commit is contained in:
ddcat666 committed 2026-10-01 13:18:06 +08:00
1 parent 839db1c319
commit 080dbcbabe
4 files changed
+236 -142

No files matched your search

+9 -9
View File
@@ -1,14 +1,15 @@
import { describe, expect, test } from "bun:test";
import { doubaoAudioVoiceOptions, isDoubaoAudioConfig, normalizeAudioVoiceForConfig, normalizeAudioVoiceValue } from "../src/lib/audio-generation";
const config = (protocol: string) => ({
provider: "custom",
model: "models/index-tts",
audioModel: "models/index-tts",
apiKey: "",
baseUrl: "",
channels: [{ models: ["index-tts"], modelCosts: [], interfaceType: protocol, baseUrl: "", apiKey: "" }],
} as any);
const config = (protocol: string) =>
({
provider: "custom",
model: "models/index-tts",
audioModel: "models/index-tts",
apiKey: "",
baseUrl: "",
channels: [{ models: ["index-tts"], modelCosts: [], interfaceType: protocol, baseUrl: "", apiKey: "" }],
}) as any;
describe("audio voice protocol handling", () => {
test("keeps custom voice identifiers for non-OpenAI channels", () => {
@@ -37,5 +38,4 @@ describe("audio voice protocol handling", () => {
const doubao = { ...config("doubao-streaming-tts"), model: "seed-audio-1.0", audioModel: "seed-audio-1.0" } as any;
expect(normalizeAudioVoiceForConfig(doubao, "zh_male_custom_official_speaker")).toBe("zh_male_custom_official_speaker");
});
});