feat: system.md双要话术+国家代码引导+四处禁令改写(防自锁)+同源断言

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
浅念
2026-10-08 12:26:39 +08:00
parent f191690d01
commit 1ce251e8cf
5 changed files with 103 additions and 7 deletions
+7 -2
View File
@@ -390,8 +390,12 @@ class ConversationManager:
# Task 12b: 轮前联系方式快照(extractor 深合并 + 覆盖 + 同号同步的比对基线)
before_contacts = normalize_contacts((profile.raw_info or {}).get("联系方式"))
# _ 前缀内部键(_cc_asked 等一次性计数)不进 LLM 输入(Task 3 审查
# Minor 3 防御纵深——渲染/推送侧已过滤,此处防提示词侧意外回显)
new_info = await self.ai.extract_info(
full_history, existing_info=profile.raw_info or {}
full_history,
existing_info={k: v for k, v in (profile.raw_info or {}).items()
if not str(k).startswith("_")},
)
logger.info("Extractor result: %s", new_info)
if new_info:
@@ -446,7 +450,8 @@ class ConversationManager:
evaluation_ran = user_msg_count >= 3
if evaluation_ran:
evaluation = await self.ai.evaluate(
profile=profile.raw_info or {},
profile={k: v for k, v in (profile.raw_info or {}).items()
if not str(k).startswith("_")},
recent_messages=full_history,
)
else: