Repository navigation
feat: 宫位接入岁前/将前/博士十二神(排盘输出 + 盘面展示 + 运限跟随) - #75
Open
Verchiel666 wants to merge 1 commit into
Open
Verchiel666 wants to merge 1 commit into
Verchiel666 wants to merge 1 commit into
Conversation
- types.ts: Palace 增加 suiQianShen/jiangQianShen/boshiShen 字段 - algorithm.ts: applyShierShen 接入 generateChart(本命按生年支/生年干) - ChartBoard.tsx: 大限/流年视图按该层支重算岁前/将前,博士不跟随运限 - PalaceCell.tsx: 宫底展示 博士·岁前·将前 - 新增 scripts/regression/shier-shen.test.ts 并挂入 npm test Refs Renhuai123#73
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
#73 用户反馈正式站排不了十二神煞,AI(命盘洞察)也回答"盘中不生成、没有数据可查"。
排查结论:
lib/ziwei/shier-shen.ts早已实现岁前/将前/博士十二神(2026-08 金标准盘核对),但全部导出函数在整个仓库零调用——模块是死代码,排盘输出、盘面展示、AI 数据链路都没有十二神煞。AI 的回答其实与当前排盘数据一致,不是幻觉。本 PR 把这套模块正式接入。
改动
lib/ziwei/types.tsPalace增加suiQianShen/jiangQianShen/boshiShen可选字段lib/ziwei/algorithm.tsapplyShierShen,在generateChart中为本命层十二宫填入三组神煞components/ChartBoard.tsxcomponents/PalaceCell.tsxscripts/regression/shier-shen.test.tsnpm test口径(沿用 shier-shen.ts 既有注释,金标准盘核对)
AI 数据链路说明
前端
/api/interpret请求体是整个chart对象,因此palaces[].suiQianShen / jiangQianShen / boshiShen现在会随请求自动带给后端,前端无需改动。注意两点:验证
npm run typecheck✅npm run build✅shier-shen.test.ts✅(岁前/将前/博士公式单元 + 端到端:每宫三组神煞齐全、十二宫不重名、岁建/岁破对宫、将星三合帝旺、博士禄存起顺逆)gender-validation)✅;patterns-sihua-bonus.test.ts在未改动基线上同样报 tsx loader 错误(Node 22 环境预存问题,与本 PR 无关)Closes #73