fix:修改代码变更继续对话查找不到之前的代码变更信息的bug

This commit is contained in:
Roe-xin
2026-03-04 16:17:56 +08:00
parent 421a8934a7
commit 95bac94479
2 changed files with 267 additions and 1 deletions

View File

@ -18,6 +18,12 @@ class ChangeTrackerService {
* 开始新的变更会话
*/
startSession(sessionId: string): void {
// 如果已有 session无论状态重用并重置为 active
if (this.currentSession) {
this.currentSession.status = 'active';
return;
}
this.currentSession = {
sessionId,
startTime: Date.now(),
@ -71,7 +77,6 @@ class ChangeTrackerService {
this.notifyListeners();
return session;
}
this.currentSession = null;
return null;
}