diff --git a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs
index 9df6ae7f..055db3cc 100644
--- a/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs
+++ b/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationService.cs
@@ -51,6 +51,7 @@ public interface IConversationService
///
/// Whether to reset all states
/// Append user init words
+ ///
///
- Task UpdateBreakpoint(bool resetStates = false, string? reason = null);
+ Task UpdateBreakpoint(bool resetStates = false, string? reason = null, params string[] excludedStates);
}
diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.UpdateBreakpoint.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.UpdateBreakpoint.cs
index 1bee7b89..8f88f44f 100644
--- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.UpdateBreakpoint.cs
+++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationService.UpdateBreakpoint.cs
@@ -22,7 +22,12 @@ public partial class ConversationService : IConversationService
{
var states = _services.GetRequiredService();
// keep language state
- if(excludedStates.IsNullOrEmpty()) excludedStates = new string[] { StateConst.LANGUAGE };
+ if (excludedStates == null) excludedStates = new string[] { };
+ if (!excludedStates.Contains(StateConst.LANGUAGE))
+ {
+ excludedStates = excludedStates.Append(StateConst.LANGUAGE).ToArray();
+ }
+
states.CleanStates(excludedStates);
}