File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
src/vs/workbench/contrib/chat Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,7 @@ export function registerChatExportActions() {
73
73
id : 'workbench.action.chat.import' ,
74
74
title : {
75
75
value : localize ( 'chat.import.label' , "Import Session" ) + '...' ,
76
- original : 'Export Session...'
76
+ original : 'Import Session...'
77
77
} ,
78
78
category : CHAT_CATEGORY ,
79
79
precondition : CONTEXT_PROVIDER_EXISTS ,
Original file line number Diff line number Diff line change @@ -218,11 +218,13 @@ export class ChatService extends Disposable implements IChatService {
218
218
}
219
219
220
220
getHistory ( ) : IChatDetail [ ] {
221
- const sessions = Object . values ( this . _persistedSessions ) ;
221
+ const sessions = Object . values ( this . _persistedSessions )
222
+ . filter ( session => session . requests . length > 0 ) ;
222
223
sessions . sort ( ( a , b ) => ( b . creationDate ?? 0 ) - ( a . creationDate ?? 0 ) ) ;
223
224
224
225
return sessions
225
226
. filter ( session => ! this . _sessionModels . has ( session . sessionId ) )
227
+ . filter ( session => ! session . isImported )
226
228
. map ( item => {
227
229
return < IChatDetail > {
228
230
sessionId : item . sessionId ,
@@ -547,9 +549,7 @@ export class ChatService extends Disposable implements IChatService {
547
549
throw new Error ( `Unknown session: ${ sessionId } ` ) ;
548
550
}
549
551
550
- if ( model . getRequests ( ) . length && ! model . isImported ) {
551
- this . _persistedSessions [ sessionId ] = model . toJSON ( ) ;
552
- }
552
+ this . _persistedSessions [ sessionId ] = model . toJSON ( ) ;
553
553
554
554
model . dispose ( ) ;
555
555
this . _sessionModels . delete ( sessionId ) ;
You can’t perform that action at this time.
0 commit comments