fix(memory): mark spawn briefs in the reply log source field

This commit is contained in:
hh committed 2026-09-14 17:12:28 +00:00
1 parent ae0a16bc17
commit 9c3262cba8
2 files changed
+13 -2

No files matched your search

+5 -1
View File
@@ -400,7 +400,8 @@ class ReplyLog:
if said.agent in self.mute:
return
text = said.text
if text.startswith("[сид:"):
seeded = text.startswith("[сид:")
if seeded:
# спавн ветки с текстом: строка сида едет над самим сообщением
text = text.split("\n\n", 1)[1] if "\n\n" in text else ""
flat = " ⏎ ".join(ln.strip() for ln in text.strip().splitlines() if ln.strip())
@@ -412,6 +413,9 @@ class ReplyLog:
where = KINDS.get(said.kind, said.kind)
if said.kind != "master" and said.title:
where = f"{where} «{said.title}»"
if seeded:
# не человек сказал, а механизм спавна: видно по источнику, не по тексту
where = f"{where} (бриф)"
path = self.dir / f"{local:%Y-%m}.md"
self.dir.mkdir(parents=True, exist_ok=True)
if not path.exists():