Resolve spacetime client binding merge conflicts

This commit is contained in:
2026-04-24 14:44:46 +08:00
parent 4f369617c7
commit f65177b147
26 changed files with 2172 additions and 1020 deletions

View File

@@ -0,0 +1,39 @@
use serde_json::{Value, json};
/// 结果页新增可扮演角色 / 场景角色 / 场景的提示词脚本。
/// 这里只生成 LLM 可审计输入,不处理 fallback避免提示词规则和业务兜底混在一起。
pub(crate) fn build_result_entity_system_prompt() -> &'static str {
"你是 RPG 自定义世界实体生成器。只输出一个 JSON 对象,不要输出 Markdown。"
}
pub(crate) fn build_result_entity_user_prompt(
profile: &Value,
kind: &str,
fallback: &Value,
) -> String {
json!({
"task": "generate_custom_world_entity",
"kind": kind,
"profile": profile,
"fallback": fallback,
})
.to_string()
}
pub(crate) fn build_result_scene_npc_system_prompt() -> &'static str {
"你是 RPG 自定义世界场景 NPC 生成器。只输出一个 JSON 对象,不要输出 Markdown。"
}
pub(crate) fn build_result_scene_npc_user_prompt(
profile: &Value,
landmark_id: &str,
fallback: &Value,
) -> String {
json!({
"task": "generate_custom_world_scene_npc",
"landmarkId": landmark_id,
"profile": profile,
"fallback": fallback,
})
.to_string()
}