Walks conversation history from newest to oldest to find the most recent non-manager AI message
that owns continuity for the next turn.
Stops and returns null (returning ownership to the conversation manager) when:
A User message explicitly @-mentions the conversation manager and no non-manager AI
message has replied since (e.g. the user said @Sage … and Sage answered directly).
An AI message from the conversation manager was handed back from another AI message
(ParentID references an AI message, or the immediately preceding row is a non-manager AI
message in the same turn).
Walks conversation history from newest to oldest to find the most recent non-manager
AImessage that owns continuity for the next turn.Stops and returns
null(returning ownership to the conversation manager) when:Usermessage explicitly@-mentions the conversation manager and no non-managerAImessage has replied since (e.g. the user said@Sage …and Sage answered directly).AImessage from the conversation manager was handed back from anotherAImessage (ParentIDreferences anAImessage, or the immediately preceding row is a non-managerAImessage in the same turn).