@@ -237,16 +237,12 @@ def _open_product_picker(
|
||||
|
||||
|
||||
def _plot_twist_depth_continuation(depth: dict) -> str:
|
||||
"""让故事深度卡的回答直接进入对应的创作分支。"""
|
||||
if depth.get("value") == "smart":
|
||||
return (
|
||||
"用户选择智能推荐。先根据商品卖点、已有素材和剧情空间推荐 15、30 或 60 秒其中一个,"
|
||||
"说明一句推荐理由,再调用 ask_user 让用户最终选择实际时长;未确认实际时长前不要给剧情方向、策略或方案。"
|
||||
)
|
||||
"""兼容旧故事深度卡的回答;新会话默认直接使用 60 秒。"""
|
||||
return (
|
||||
f"用户已选择:{depth['label']}。立刻按这个故事深度给出 3 个明显不同的剧情方向,"
|
||||
"每个方向必须写人物关系、开场冲突、商品如何进入剧情、商品承担的作用、最终反转、情绪和偏故事/偏转化;"
|
||||
"然后调用 ask_user 让用户点击选择或输入自己的想法。不得按默认 15 秒偷换结构。"
|
||||
"调用 present_story_directions 展示完整方向卡,让用户点击选择或输入自己的想法;"
|
||||
"不要用 ask_user 只列三个标题。不得按默认 15 秒偷换结构。"
|
||||
)
|
||||
|
||||
|
||||
@@ -2482,12 +2478,8 @@ class CreationConversationViewSet(TeamScopedViewSetMixin, ModelViewSet):
|
||||
appearance_prompt = f"{prev_prompt};按用户最新要求调整:{clean_text}"
|
||||
else:
|
||||
appearance_prompt = clean_text
|
||||
# 卸掉上一批平台定妆锁定,避免新旧角色叠在 pinned_refs 里
|
||||
old_model_ids = {
|
||||
str(item).strip()
|
||||
for item in (memory_now.get("person_cast_model_ids") or [])
|
||||
if str(item).strip()
|
||||
}
|
||||
# 只替换正在确认的这一位,已确认的前面角色保持锁定。
|
||||
old_model_ids = set()
|
||||
legacy_id = str(memory_now.get("person_model_id") or "").strip()
|
||||
if legacy_id:
|
||||
old_model_ids.add(legacy_id)
|
||||
@@ -2503,9 +2495,11 @@ class CreationConversationViewSet(TeamScopedViewSetMixin, ModelViewSet):
|
||||
memory_now["person_confirm_pending"] = False
|
||||
memory_now.pop("person_source_ready", None)
|
||||
memory_now.pop("person_model_id", None)
|
||||
memory_now.pop("person_cast_model_ids", None)
|
||||
memory_now["person_cast_model_ids"] = [
|
||||
item for item in (memory_now.get("person_cast_model_ids") or [])
|
||||
if str(item) not in old_model_ids
|
||||
]
|
||||
memory_now.pop("person_cast_pending", None)
|
||||
memory_now.pop("person_cast_total", None)
|
||||
conversation.memory = memory_now
|
||||
conversation.save(update_fields=["memory", "pinned_refs", "updated_at"])
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user