Skip to content

fix: persist TUI branch sessions#590

Open
HamsteRider-m wants to merge 1 commit into
lsdefine:mainfrom
HamsteRider-m:fix/tui2-branch-persist
Open

fix: persist TUI branch sessions#590
HamsteRider-m wants to merge 1 commit into
lsdefine:mainfrom
HamsteRider-m:fix/tui2-branch-persist

Conversation

@HamsteRider-m

Copy link
Copy Markdown

What

  • Persist TUI2 /branch snapshots into temp/model_responses using the existing /continue raw log format.
  • Register the branch name with session_names so named branches are discoverable.
  • Point the branched agent and its LLM clients at the new snapshot log so future turns append to the branched session instead of the source session.

Why

Before this change, /branch only copied in-memory UI/backend state. If the branched session was later searched via /continue, there was no standalone log for that branch, and branch names could resolve to the wrong/current session log.

Testing

  • python -m py_compile frontends/tuiapp_v2.py
  • Targeted restore check: _persist_branch_snapshot() output is parsed by continue_cmd._pairs() + _parse_native_history() and matches the expected restored history.
  • git diff --check --cached -- frontends/tuiapp_v2.py

Note: local commit used --no-verify because this checkout's pre-commit hook points to a missing scripts/plantree_pre_commit.py; the checks above were run manually before committing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant