This build was committed by a bot.

This commit is contained in:
github-actions[bot]
2026-03-05 06:47:47 +00:00
parent ffa4e24548
commit 8a82fe302a
3 changed files with 4 additions and 3 deletions

View File

@@ -239,7 +239,8 @@ ${postPrompt}` }
});
if (!r.ok) return null;
const d = await r.json();
return (d.choices?.[0]?.message?.content?.trim() || "").replace(/["']/g, "") || null;
const rawTitle = d.choices?.[0]?.message?.content?.trim() || "";
return rawTitle.replace(/[<>:"/\\|?*\x00-\x1f`]/g, "").trim().replace(/\.$/, "") || null;
} catch (e) {
console.error("AI title gen failed:", e);
return null;