chore: Enable "curly" rule to avoid single-statement if confusion/errors.

This commit is contained in:
cpojer
2026-01-31 16:19:20 +09:00
parent 009b16fab8
commit 5ceff756e1
1266 changed files with 27871 additions and 9393 deletions

View File

@@ -45,11 +45,17 @@ export async function minimaxUnderstandImage(params: {
modelBaseUrl?: string;
}): Promise<string> {
const apiKey = params.apiKey.trim();
if (!apiKey) throw new Error("MiniMax VLM: apiKey required");
if (!apiKey) {
throw new Error("MiniMax VLM: apiKey required");
}
const prompt = params.prompt.trim();
if (!prompt) throw new Error("MiniMax VLM: prompt required");
if (!prompt) {
throw new Error("MiniMax VLM: prompt required");
}
const imageDataUrl = params.imageDataUrl.trim();
if (!imageDataUrl) throw new Error("MiniMax VLM: imageDataUrl required");
if (!imageDataUrl) {
throw new Error("MiniMax VLM: imageDataUrl required");
}
if (!/^data:image\/(png|jpeg|webp);base64,/i.test(imageDataUrl)) {
throw new Error("MiniMax VLM: imageDataUrl must be a base64 data:image/(png|jpeg|webp) URL");
}