Session-Level Conversation History Management#1113
Conversation
📋 Review SummaryThis PR introduces a comprehensive session management system that enables seamless session resumption scoped to the current project directory. It replaces the legacy 🔍 General Feedback
🎯 Specific Feedback🔴 CriticalNo critical issues identified in this review. 🟡 HighNo high priority issues identified in this review. 🟢 Medium
🔵 Low
✅ Highlights
|
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
Mingholy
left a comment
There was a problem hiding this comment.
Minor functional regression found in slash command support.
Other works fine in the terminal or Zed.
|
How can I use |
Summary
This PR introduces a streamlined session management system, enabling seamless session resumption scoped to the current project (working directory). It also removes the legacy
/chatslash commands in favor of a simpler, unified workflow via CLI arguments./chatcommands: The/chat save,/chat resume,/chat list,/chat delete, and/chat shareslash commands have been removed./clearbehavior changed: Now starts a fresh session (new sessionId) rather than just clearing the display.Features
--continue: Resume the Most Recent Sessionqwen --continue --prompt "Continue where we left off"--resume: Pick a Session from Interactive PickerTo resume a specific session by ID:
/clear(aliases:/reset,/new)The
/clearcommand now:ACP Integration
Session management
Now the ACP integration supports two more commands:
These two ACP commands will be used by VSCode plugin, to support session level history management.
Initialization
Now during the initialization phase, the agent will return
agentInfoandmodeswith following content:Approval Mode
The implementation of approval mode strictly follows the protocol defined in ACP Session Modes
Chat Auto Save
Now all chat history are auto saved to user home directory under
~/.qwen/projects/<project_id>/chats, in all the three execution mode: interactive mode, non-interactive mode and ACP integration.All chat history are kept including user prompt, assistant reply, tool result, context compression, slash commands, and ui telemetry events. The full chat history UI can be recovered on session resume.
Storage Format
Location
Sessions are stored at:
~/.qwen/projects/<project_id>/chats/<sessionId>.jsonlJSONL Record Structure
Migration Notes
/chat save <tag>checkpoints will no longer be accessible. Sessions are now automatically saved.qwen --resumeto see available sessions instead of/chat list./clearcommand now starts a completely new session. Previous behavior of just clearing display is no longer supported.Testing
--continuein various project directories--resumepicker with multiple sessions/clearcreates new session and resets contextnpm run preflightRelated Issues