Skip to content

fix(tui): 在 tui-v2 丢失当前会话记录#552

Open
AiHyo wants to merge 1 commit into
lsdefine:mainfrom
AiHyo:fix/tui-v2-continue-preserve-current-log
Open

fix(tui): 在 tui-v2 丢失当前会话记录#552
AiHyo wants to merge 1 commit into
lsdefine:mainfrom
AiHyo:fix/tui-v2-continue-preserve-current-log

Conversation

@AiHyo
Copy link
Copy Markdown

@AiHyo AiHyo commented Jun 1, 2026

Summary

Fixes a tui v2 issue where a newly started conversation could disappear from recoverable history after switching to another session with /continue.

Why

GenericAgent writes the active model response log to agent.log_path, which uses a microsecond-based filename.

However, before restoring another session, reset_conversation() tried to snapshot model_responses_{pid}.txt. That PID-based path may not be the active log file, so a new conversation could fail to be saved before /continue switched away from it.

This keeps the existing tui v2 /continue flow, but snapshots the real active log path and excludes that active log from the recoverable session list.

Validation

Completed local testing with tui v2: created a new conversation A, switched to conversation B with /continue, then used /continue again and confirmed conversation A remained recoverable.

@AiHyo AiHyo changed the title fix(tui-v2): keep new conversation recoverable after /continue switch fix(tui): 在 tui-v2 丢失当前会话记录 Jun 2, 2026
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