feat(conversations): the recall hook and the user sink learn whose turn it is

This commit is contained in:
hh committed 2026-09-06 23:26:26 +02:00
1 parent e79e9fc149
commit 5eb9f435ec
4 files changed
+48 -8

No files matched your search

+5 -2
View File
@@ -336,9 +336,11 @@ class Turns(Seeds):
if self._envelope is None:
return None
if conv.kind == "master":
return self._envelope.build(text=text, kind="master")
return self._envelope.build(text=text, kind="master", agent=conv.agent_name)
if conv.kind == "branch":
return self._envelope.recall_only(text=text, kind="branch")
return self._envelope.recall_only(
text=text, kind="branch", agent=conv.agent_name
)
return None
async def _note_user(self, conv: Conversation, text: str) -> None:
@@ -350,6 +352,7 @@ class Turns(Seeds):
title=conv.title,
text=text,
at=datetime.now(UTC),
agent=conv.agent_name,
)
try:
result = self._user_sink(message)