This build was committed by a bot.

This commit is contained in:
github-actions[bot]
2026-03-17 05:21:32 +00:00
parent f9d54527c7
commit 514ce64534
3 changed files with 3 additions and 3 deletions

View File

@@ -228,7 +228,7 @@ var generateTitleWithAI = async (messages) => {
})
});
if (!r.ok) return null;
return ((await r.json()).choices?.[0]?.message?.content?.trim() || "").replace(/[<>:"/\\|?*\x00-\x1f`]/g, "").trim().replace(/\.$/, "") || null;
return ((await r.json()).choices?.[0]?.message?.content?.trim() || "").split("\n")[0].replace(/[<>:"/\\|?*\x00-\x1f`]/g, "").trim().replace(/\.$/, "") || null;
} catch (e) {
console.error("AI title gen failed:", e);
return null;