resolve conflict
This commit is contained in:
commit
6693c7cff2
|
|
@ -51,8 +51,9 @@ public interface IConversationService
|
|||
/// </summary>
|
||||
/// <param name="resetStates">Whether to reset all states</param>
|
||||
/// <param name="reason">Append user init words</param>
|
||||
/// <param name="excludedStates"></param>
|
||||
/// <returns></returns>
|
||||
Task UpdateBreakpoint(bool resetStates = false, string? reason = null);
|
||||
Task UpdateBreakpoint(bool resetStates = false, string? reason = null, params string[] excludedStates);
|
||||
|
||||
Task<string> GetConversationSummary(string conversationId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace BotSharp.Core.Conversations.Services;
|
|||
|
||||
public partial class ConversationService : IConversationService
|
||||
{
|
||||
public async Task UpdateBreakpoint(bool resetStates = false, string? reason = null)
|
||||
public async Task UpdateBreakpoint(bool resetStates = false, string? reason = null, params string[] excludedStates)
|
||||
{
|
||||
var db = _services.GetRequiredService<IBotSharpRepository>();
|
||||
var routingCtx = _services.GetRequiredService<IRoutingContext>();
|
||||
|
|
@ -22,7 +22,13 @@ public partial class ConversationService : IConversationService
|
|||
{
|
||||
var states = _services.GetRequiredService<IConversationStateService>();
|
||||
// keep language state
|
||||
states.CleanStates(StateConst.LANGUAGE);
|
||||
if (excludedStates == null) excludedStates = new string[] { };
|
||||
if (!excludedStates.Contains(StateConst.LANGUAGE))
|
||||
{
|
||||
excludedStates = excludedStates.Append(StateConst.LANGUAGE).ToArray();
|
||||
}
|
||||
|
||||
states.CleanStates(excludedStates);
|
||||
}
|
||||
|
||||
var hooks = _services.GetServices<IConversationHook>()
|
||||
|
|
|
|||
Loading…
Reference in a new issue