@nicoloboschi IIUC after #6428, when opening hermes chat and resuming an old session, _session_turns is initialized to [], so on the next retain all previously stored turns will be deleted. Only the new turns will be stored since retain with document_id completely overwrites.
Any fix to this should also keep the turn counter and forking in mind. If the full contents instead of only new data are being stored, storing the full turns of a forked session will result in data duplication. I believe it might be better to tag with parent and session ids for all retains and only include new messages in forks.
@nicoloboschi IIUC after #6428, when opening hermes chat and resuming an old session,
_session_turnsis initialized to [], so on the next retain all previously stored turns will be deleted. Only the new turns will be stored since retain withdocument_idcompletely overwrites.Any fix to this should also keep the turn counter and forking in mind. If the full contents instead of only new data are being stored, storing the full turns of a forked session will result in data duplication. I believe it might be better to tag with parent and session ids for all retains and only include new messages in forks.