feat: complete verifiable birth-time rectification flow

This commit is contained in:
Jesse_Chen
2026-07-21 22:16:18 +08:00
parent eb8ed8bee4
commit bfc6870614
117 changed files with 6215 additions and 1038 deletions
+8
View File
@@ -48,3 +48,11 @@ export function parseAgentReply(value: string, theme: ReplyTheme) {
title,
};
}
export function resolveSessionTitle(question: string, modelTitle?: string): string {
if (modelTitle && modelTitle !== "一般占星咨询") return modelTitle;
const normalized = question.replace(/\s+/g, " ").trim().replace(/[?!,;:]+$/u, "");
if (!normalized) return "新对话";
const characters = Array.from(normalized);
return characters.length > 14 ? `${characters.slice(0, 14).join("")}` : normalized;
}