o
    ã=8j
  ã                   @  sj   U d Z ddlmZ ddlmZ ddlmZmZ eeƒZ	de
d< ddd„Zddd„Zddd„Zddd„ZdS )u³   In-Memory-Session-Speicher fÃ¼r den MVP.

HÃ¤lt pro session_id den GesprÃ¤chsverlauf. Bewusst simpel (Dict);
fÃ¼r Produktion spÃ¤ter SQLite/Redis â€” Schnittstelle bleibt gleich.
é    )Úannotations)Údefaultdict)ÚDictÚListzDict[str, List[dict]]Ú	_SESSIONSÚ
session_idÚstrÚreturnú
List[dict]c                 C  s   t |  S ©N©r   ©r   © r   ú4/home/nk/hobo-godmode/plappi-mvp/backend/sessions.pyÚhistory   s   r   ÚroleÚtextÚNonec                 C  s   t |   ||dœ¡ d S )N)r   r   )r   Úappend)r   r   r   r   r   r   Úadd_turn   s   r   c                 C  s   t  | d ¡ d S r   )r   Úpopr   r   r   r   Úreset   s   r   ÚnÚintc                 C  s   t |  | d … S r   r   )r   r   r   r   r   Úrecent   s   r   N)r   r   r	   r
   )r   r   r   r   r   r   r	   r   )r   r   r	   r   )r   r   r   r   r	   r
   )Ú__doc__Ú
__future__r   Úcollectionsr   Útypingr   r   Úlistr   Ú__annotations__r   r   r   r   r   r   r   r   Ú<module>   s    


