@@ -605,9 +605,14 @@ public void CreateNewConversation(Conversation conversation)
605605 public bool DeleteConversation ( string conversationId )
606606 {
607607 if ( string . IsNullOrEmpty ( conversationId ) ) return false ;
608+
608609 var filterConv = Builders < ConversationCollection > . Filter . Eq ( x => x . Id , conversationId ) ;
609610 var filterDialog = Builders < ConversationDialogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
611+ var filterExeLog = Builders < ExecutionLogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
612+ var filterPromptLog = Builders < LlmCompletionLogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
610613
614+ var exeLogDeleted = _dc . ExectionLogs . DeleteMany ( filterExeLog ) ;
615+ var promptLogDeleted = _dc . LlmCompletionLogs . DeleteMany ( filterPromptLog ) ;
611616 var dialogDeleted = _dc . ConversationDialogs . DeleteMany ( filterDialog ) ;
612617 var convDeleted = _dc . Conversations . DeleteMany ( filterConv ) ;
613618 return convDeleted . DeletedCount > 0 || dialogDeleted . DeletedCount > 0 ;
@@ -843,8 +848,8 @@ public void AddExecutionLogs(string conversationId, List<string> logs)
843848 {
844849 if ( string . IsNullOrEmpty ( conversationId ) || logs . IsNullOrEmpty ( ) ) return ;
845850
846- var filter = Builders < ExectionLogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
847- var update = Builders < ExectionLogCollection > . Update
851+ var filter = Builders < ExecutionLogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
852+ var update = Builders < ExecutionLogCollection > . Update
848853 . SetOnInsert ( x => x . Id , Guid . NewGuid ( ) . ToString ( ) )
849854 . PushEach ( x => x . Logs , logs ) ;
850855
@@ -856,7 +861,7 @@ public List<string> GetExecutionLogs(string conversationId)
856861 var logs = new List < string > ( ) ;
857862 if ( string . IsNullOrEmpty ( conversationId ) ) return logs ;
858863
859- var filter = Builders < ExectionLogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
864+ var filter = Builders < ExecutionLogCollection > . Filter . Eq ( x => x . ConversationId , conversationId ) ;
860865 var logCollection = _dc . ExectionLogs . Find ( filter ) . FirstOrDefault ( ) ;
861866
862867 logs = logCollection ? . Logs ?? new List < string > ( ) ;
0 commit comments