+
    jHàjÙ  ã                  ób   € R t ^ RIHt ^ RIHt ^ RIHt RtRtRt	Rt
R R	 ltR
 R ltR R ltR# )aÌ  User-facing copy for dashboard chat (``/api/pty``) start failures.

``pty_ws`` writes one red line into the terminal and closes with 1011 when the
``hermes --tui`` child cannot be spawned. The exception text alone is either
raw errno noise (``[Errno 2] No such file or directory: 'node'``), a bare exit
code (``SystemExit(1)`` after ``_make_tui_argv`` already printed to the server
log), or empty (``RegistryFull``). Turn each into what happened + what to do.
)Úannotations)ÚHTTPException)ÚRegistryFullzˆChat could not start: Hermes needs Node.js to run the terminal chat. Install Node 18+ (for example from nodejs.org) and reopen this tab.zlChat could not start: too many chat terminals are open in other tabs. Close one and click Start new session.zZChat could not start: {detail} Pick another profile from the switcher and reopen this tab.znChat could not start: {detail} Check the server log (`hermes dashboard` terminal) and click Start new session.c               ó    € V ^8„  d   QhRRRR/# )é   ÚexcÚBaseExceptionÚreturnÚbool© )Úformats   "ÚJ/home/ubuntu/.hermes/hermes-agent/hermes_cli/web_routers/chat_ws_errors.pyÚ__annotate__r      s   € ÷ cñ c�}ð c¨ñ có    c                ó†   € \        V 4      p\        V \        4      ;'       g     R V9   ;'       g    RV9   ;'       g    RV9   # )z'node'z'npm'zNode.js)ÚstrÚ
isinstanceÚ
SystemExit)r   Útexts   & r   Ú_node_missingr      s@   € Üˆs‹8€DÜ�cœ:Ó&×bÐb¨(°dÑ*:×bÐb¸gÈ¹o×bÐbÐQZÐ^bÑQbÐbr   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r	   r   r   )r   s   "r   r   r   !   s   € ÷ Vñ V Mð V°cñ Vr   c                ó‚  € \        V \        4      '       d   \        # \        V \        4      '       d3   \        P                  \        \        V P                  4      4      R7      # \        V 4      '       d   \        # \        P                  \        \        V 4      ;'       g    \        V 4      P                  4      R7      # )zCOne plain sentence for the terminal pane; never the bare exception.)Údetail)r   r   ÚCHAT_TOO_MANY_TERMINALSr   ÚCHAT_PROFILE_UNKNOWNr   Ú	_sentencer   r   r   ÚCHAT_NEEDS_NODEÚCHAT_START_FAILEDÚtypeÚ__name__)r   s   &r   Úchat_start_failure_messager    !   sƒ   € ä�#”|×$Ò$Ü&Ð&Ü�#”}×%Ò%Ü#×*Ñ*´)¼CÀÇ
Á
»OÓ2LÐ*ÓMÐMÜ�S×ÒÜÐÜ×#Ñ#¬9´S¸³X×5SÐ5SÄÀcÃ×ASÑASÓ+TÐ#ÓUÐUr   c               ó    € V ^8„  d   QhRRRR/# )r   r   r   r	   r   )r   s   "r   r   r   ,   s   € ÷ Bñ B�Cð B˜Cñ Br   c                ór   € V P                  4       p V '       g   R # V P                  R4      '       d   V # V  R2# )z+the terminal process could not be launched.Ú.)r#   Ú!Ú?)ÚstripÚendswith)r   s   &r   r   r   ,   s2   € Ø�:‰:‹<€DßÙ<Ø—=‘= ×1Ò1ˆ4ÐA¸$¸¸q°zÐAr   N)Ú__doc__Ú
__future__r   Úfastapir   Úhermes_cli.pty_sessionr   r   r   r   r   r   r    r   r   r   r   Ú<module>r,      sN   ðñõ #å !å /ðJð ð
-ð ð tÐ ð EÐ õcõ
V÷Br   