Commit 75e9a138 by luoqi

chore(types): expose plan reason breakdown for PriorityHover

PlanReasonBriefSchema 增 breakdown(z.unknown().nullable().optional()),
plan.service.toPlanReasonBrief 透传 — 前端 PriorityHover 拿到 6 因子
明细做悬浮算法解释,无 breakdown 时 fallback 简版文案。
parent 86ddd374
......@@ -380,6 +380,7 @@ function toPlanReasonBrief(
signals: (r.signals as PlanReasonBrief['signals']) ?? null,
priorityScore: r.priorityScore,
reason: r.reason,
breakdown: r.breakdown ?? null,
};
}
......
......@@ -158,6 +158,8 @@ export const PlanReasonBriefSchema = z.object({
priorityScore: z.number(),
/// 老数据 / signals 缺失时的兜底自然语言
reason: z.string(),
/// 6 因子算分明细 — 前端 PriorityHover 渲染。无 breakdown 时 fallback 简版文案。
breakdown: z.unknown().nullable().optional(),
});
export type PlanReasonBrief = z.infer<typeof PlanReasonBriefSchema>;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment