fff77dac3f
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>
29 lines
639 B
TypeScript
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,
|
|
});
|
|
}
|