Fixes a bug where SetCurrentState mistakenly copied internal _curStates
instead of the provided input state.
This commit is contained in:
parent
3bef027b22
commit
3d23639918
|
|
@ -443,7 +443,7 @@ public class ConversationStateService : IConversationStateService
|
|||
|
||||
public void SetCurrentState(ConversationState state)
|
||||
{
|
||||
var values = _curStates.Values.ToList();
|
||||
var values = state.Values.ToList();
|
||||
var copy = JsonSerializer.Deserialize<List<StateKeyValue>>(JsonSerializer.Serialize(values));
|
||||
_curStates = new ConversationState(copy ?? []);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue