feat(config,curator,recall): memory curator job on opus high, notes head inline in the envelope, portrait in the morning seed
This commit is contained in:
+10
-6
@@ -371,15 +371,19 @@ def append_notes(name: str, lines: list[str]) -> int:
|
||||
|
||||
|
||||
def sort_notes() -> None:
|
||||
"""Сортирует и дедупит только `## лента`; шапку (сейчас/паттерны/…) не трогает."""
|
||||
for path in NOTES.glob("* - наблюдения.md"):
|
||||
text = path.read_text(encoding="utf-8")
|
||||
head, bullets = [], []
|
||||
for ln in text.splitlines():
|
||||
(bullets if ln.startswith("- ") else head).append(ln)
|
||||
head_text, sep, feed = text.partition("## лента\n")
|
||||
bullets = [ln for ln in feed.splitlines() if ln.startswith("- ")]
|
||||
bullets = sorted(dict.fromkeys(bullets), key=lambda ln: ln[2:12])
|
||||
while head and not head[-1].strip():
|
||||
head.pop()
|
||||
path.write_text("\n".join([*head, "", *bullets]) + "\n", encoding="utf-8")
|
||||
if not sep:
|
||||
head_text = head_text.rstrip("\n") + "\n\n"
|
||||
head_text = head_text.replace("\n- ", "\n").rstrip() + "\n\n"
|
||||
path.write_text(
|
||||
head_text.rstrip("\n") + "\n\n## лента\n" + "\n".join(bullets) + "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
|
||||
def link_card(person_path: Path, name: str) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user