Skip to content

Commit 7eba2d2

Browse files
authored
Merge pull request microsoft#210003 from microsoft/roblou/optimistic-flamingo
Don't persist inline chat sessions in history
2 parents 916d69b + 14b15db commit 7eba2d2

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/vs/workbench/contrib/chat/common/chatServiceImpl.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export class ChatService extends Disposable implements IChatService {
177177

178178
private saveState(): void {
179179
let allSessions: (ChatModel | ISerializableChatData)[] = Array.from(this._sessionModels.values())
180+
.filter(session => session.initialLocation === ChatAgentLocation.Panel)
180181
.filter(session => session.getRequests().length > 0);
181182
allSessions = allSessions.concat(
182183
Object.values(this._persistedSessions)
@@ -664,7 +665,9 @@ export class ChatService extends Disposable implements IChatService {
664665
throw new Error(`Unknown session: ${sessionId}`);
665666
}
666667

667-
this._persistedSessions[sessionId] = model.toJSON();
668+
if (model.initialLocation === ChatAgentLocation.Panel) {
669+
this._persistedSessions[sessionId] = model.toJSON();
670+
}
668671

669672
this._sessionModels.deleteAndDispose(sessionId);
670673
this._pendingRequests.get(sessionId)?.cancel();

0 commit comments

Comments
 (0)