feat: 发布草稿助手挂载长期记忆工具

This commit is contained in:
2026-10-28 20:43:39 +08:00
parent abe75f87aa
commit fb05b47d46
3 changed files with 41 additions and 34 deletions
+5 -7
View File
@@ -87,13 +87,11 @@ class ChatService:
session.llm_response_chain = None
await self._session_repo.update(session)
just_saved = None
memory_count = 0
if scene == "general":
just_saved = await self._memory.maybe_capture_from_user(
actor, thread_id=thread_id, text=text
)
memory_count = await self._memory.count_active(actor)
# 各 scene 均可按需 memory_*;显式「记住」也会 maybe_capture
just_saved = await self._memory.maybe_capture_from_user(
actor, thread_id=thread_id, text=text
)
memory_count = await self._memory.count_active(actor)
system_prompt = build_system_prompt(
memory_count=memory_count,