File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
src/vs/workbench/contrib/chat/common Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,7 @@ export class ChatService extends Disposable implements IChatService {
177
177
178
178
private saveState ( ) : void {
179
179
let allSessions : ( ChatModel | ISerializableChatData ) [ ] = Array . from ( this . _sessionModels . values ( ) )
180
+ . filter ( session => session . initialLocation === ChatAgentLocation . Panel )
180
181
. filter ( session => session . getRequests ( ) . length > 0 ) ;
181
182
allSessions = allSessions . concat (
182
183
Object . values ( this . _persistedSessions )
@@ -664,7 +665,9 @@ export class ChatService extends Disposable implements IChatService {
664
665
throw new Error ( `Unknown session: ${ sessionId } ` ) ;
665
666
}
666
667
667
- this . _persistedSessions [ sessionId ] = model . toJSON ( ) ;
668
+ if ( model . initialLocation === ChatAgentLocation . Panel ) {
669
+ this . _persistedSessions [ sessionId ] = model . toJSON ( ) ;
670
+ }
668
671
669
672
this . _sessionModels . deleteAndDispose ( sessionId ) ;
670
673
this . _pendingRequests . get ( sessionId ) ?. cancel ( ) ;
You can’t perform that action at this time.
0 commit comments