mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-06 13:39:23 +01:00
Merge pull request #210003 from microsoft/roblou/optimistic-flamingo
Don't persist inline chat sessions in history
This commit is contained in:
@@ -177,6 +177,7 @@ export class ChatService extends Disposable implements IChatService {
|
||||
|
||||
private saveState(): void {
|
||||
let allSessions: (ChatModel | ISerializableChatData)[] = Array.from(this._sessionModels.values())
|
||||
.filter(session => session.initialLocation === ChatAgentLocation.Panel)
|
||||
.filter(session => session.getRequests().length > 0);
|
||||
allSessions = allSessions.concat(
|
||||
Object.values(this._persistedSessions)
|
||||
@@ -664,7 +665,9 @@ export class ChatService extends Disposable implements IChatService {
|
||||
throw new Error(`Unknown session: ${sessionId}`);
|
||||
}
|
||||
|
||||
this._persistedSessions[sessionId] = model.toJSON();
|
||||
if (model.initialLocation === ChatAgentLocation.Panel) {
|
||||
this._persistedSessions[sessionId] = model.toJSON();
|
||||
}
|
||||
|
||||
this._sessionModels.deleteAndDispose(sessionId);
|
||||
this._pendingRequests.get(sessionId)?.cancel();
|
||||
|
||||
Reference in New Issue
Block a user