Implement three divination modes, learn pages, and PM2 deploy on port 3130.

Add liuyao/bazi/combined flows with shared calc and AI infrastructure, 64-gua learn routes, and update Ubuntu PM2 deployment docs for port 3130.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-06-10 20:19:49 +08:00
parent d141623070
commit fff77dac3f
41 changed files with 2590 additions and 385 deletions
+30
View File
@@ -0,0 +1,30 @@
"use server";
import { streamAIResponse } from "@/lib/ai/stream";
import {
calculateBazi,
formatBaziForPrompt,
type BaziInput,
} from "@/lib/calc/bazi";
import { BAZI_SYSTEM_PROMPT } from "@/lib/prompts";
export async function getBaziAnswer(
input: BaziInput,
question: string,
birthPlaceName: string,
) {
const chart = calculateBazi(input);
const chartText = formatBaziForPrompt(chart);
return streamAIResponse(
BAZI_SYSTEM_PROMPT,
`【出生时空】
出生地:${birthPlaceName}
【排盘信息】
${chartText}
【问事】
${question}`,
);
}