fix(web): narrow natal-minute consultation mode for the production build

BUG-341 added declared_birth_window, but the natal-minute helper still returned boolean, so next build could not pass that mode into serverChartFromProfile.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-21 20:37:44 +08:00
parent ecb72cc5de
commit eeee0e49af
3 changed files with 28 additions and 1 deletions
@@ -12,10 +12,16 @@ export const consultationBirthTimeModeSchema = z.enum([
]);
export type ConsultationBirthTimeMode = z.infer<typeof consultationBirthTimeModeSchema>;
export type NatalMinuteConsultationMode = Extract<
ConsultationBirthTimeMode,
"verified_chart" | "unverified_birth_time"
>;
export const UNVERIFIED_BIRTH_TIME_NOTICE = "使用未校正填报时间;分钟敏感结论的置信度已降低。";
export function isNatalMinuteConsultationMode(mode: ConsultationBirthTimeMode): boolean {
export function isNatalMinuteConsultationMode(
mode: ConsultationBirthTimeMode,
): mode is NatalMinuteConsultationMode {
return mode === "verified_chart" || mode === "unverified_birth_time";
}