fix: export command should use current session ID instead of loadLastSession#2268
fix: export command should use current session ID instead of loadLastSession#2268pomelo-nwu merged 1 commit intomainfrom
Conversation
…Session The /export commands (html, md, json, jsonl) were incorrectly using loadLastSession() which loads the last modified session from disk, rather than the currently active session. This fix uses config.getSessionId() to get the current session ID and loads the correct session with loadSession(sessionId). Fixes #2267 Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
📋 Review SummaryThis PR fixes a bug where the 🔍 General Feedback
🎯 Specific Feedback🔵 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. |
Summary
Fixes #2267
The
/exportcommands (html, md, json, jsonl) were incorrectly usingloadLastSession()which loads the last modified session from disk, rather than the currently active session.Changes
config.getSessionId()to get the current session IDloadSession(sessionId)to load the correct session instead ofloadLastSession()Root Cause
loadLastSession()returns the session with the most recent file modification time, which may not be the currently active session when multiple sessions exist in the same directory.Test Plan
loadSessioninstead ofloadLastSessiongetSessionIdmock to test contextAffected Commands
/export html/export md/export json/export jsonl