Files
zhimingge/app/server.ts
T
dekun fff77dac3f 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>
2026-06-10 20:19:49 +08:00

29 lines
639 B
TypeScript

"use server";
import { getLiuyaoAnswer } from "@/app/actions/liuyao";
/** 兼容旧版 divination 组件签名 */
export async function getAnswer(
prompt: string,
guaMark: string,
guaTitle: string,
guaResult: string,
guaChange: string,
) {
const now = new Date();
const calcDate = now.toISOString().slice(0, 10);
const calcTime = `${now.getHours().toString().padStart(2, "0")}:${now.getMinutes().toString().padStart(2, "0")}`;
return getLiuyaoAnswer({
question: prompt,
calcDate,
calcTime,
locationName: "未指定",
longitude: 120,
guaMark,
guaTitle,
guaResult,
guaChange,
});
}