Skip to content

Commit

Permalink
Don't persist inline chat sessions (#209975)
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Apr 9, 2024
1 parent 2a0465f commit a516026
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/vs/workbench/contrib/chat/common/chatServiceImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ export class ChatService extends Disposable implements IChatService {

private saveState(): void {
let allSessions: (ChatModel | ISerializableChatData)[] = Array.from(this._sessionModels.values())
.filter(session => !session.providerId.startsWith('inlinechat:'))
.filter(session => session.getRequests().length > 0);
allSessions = allSessions.concat(
Object.values(this._persistedSessions)
Expand Down Expand Up @@ -705,7 +706,9 @@ export class ChatService extends Disposable implements IChatService {
throw new Error(`Unknown session: ${sessionId}`);
}

this._persistedSessions[sessionId] = model.toJSON();
if (!model.providerId.startsWith('inlinechat')) {
this._persistedSessions[sessionId] = model.toJSON();
}

this._sessionModels.deleteAndDispose(sessionId);
this._pendingRequests.get(sessionId)?.cancel();
Expand Down

0 comments on commit a516026

Please sign in to comment.