fix: pass profile-scoped SessionDB to _session_latest_descendant in dashboard chat PTY resume

The chat PTY launch path landed on main after PR #50558 and still called
_session_latest_descendant() with the old one-arg signature. Open the
requested profile's state DB (matching the REST endpoint) so profile-scoped
resume resolves descendants in the right database.
This commit is contained in:
teknium1 2026-07-07 16:36:05 -07:00 committed by Teknium
parent 543f069093
commit 6015ee5d2a

View file

@ -13757,7 +13757,13 @@ def _resolve_chat_argv(
env["HERMES_HOME"] = str(profile_dir)
if resume:
latest_resume, _latest_path = _session_latest_descendant(resume)
_resume_db = _open_session_db_for_profile(
requested if profile_dir is not None else None
)
try:
latest_resume, _latest_path = _session_latest_descendant(resume, _resume_db)
finally:
_resume_db.close()
if latest_resume:
resume = latest_resume
env["HERMES_TUI_RESUME"] = resume