feat: thought loop — Lyra's threaded, surfaceable train of thought #4
+4
-3
@@ -289,12 +289,13 @@ def decay() -> int:
|
|||||||
|
|
||||||
|
|
||||||
def record_response(thread_id: int, text: str) -> bool:
|
def record_response(thread_id: int, text: str) -> bool:
|
||||||
"""Brian's reply to a surfaced thread. Stored as pending feedback; next `think`
|
"""Brian's reply to a thread. Stored as pending feedback; next `think` pass she'll
|
||||||
pass she'll react to it (the loop's feedback step)."""
|
react to it (the loop's feedback step). Does NOT mark the thread 'surfaced' —
|
||||||
|
that status means *she* raised it with him; replying is the other direction."""
|
||||||
text = (text or "").strip()
|
text = (text or "").strip()
|
||||||
if not text or not get_thread(thread_id):
|
if not text or not get_thread(thread_id):
|
||||||
return False
|
return False
|
||||||
update_thread(thread_id, last_response=text, responded_at=_now(), status="surfaced")
|
update_thread(thread_id, last_response=text, responded_at=_now())
|
||||||
logbus.log("info", "thought response", thread=thread_id, chars=len(text))
|
logbus.log("info", "thought response", thread=thread_id, chars=len(text))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user