From 789c64e0d4c52d50d935d1dd5bc7638241091582 Mon Sep 17 00:00:00 2001 From: dajiaohuang Date: Sun, 4 Oct 2026 10:15:00 +0800 Subject: [PATCH] Preserve assistant options when editing --- .../ChatAgentConfigViewModel/ChatAgentConfigViewModel.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Desktop/RodelAgent.UI/ViewModels/Core/ChatAgentConfigViewModel/ChatAgentConfigViewModel.cs b/src/Desktop/RodelAgent.UI/ViewModels/Core/ChatAgentConfigViewModel/ChatAgentConfigViewModel.cs index aab1feff..efede1de 100644 --- a/src/Desktop/RodelAgent.UI/ViewModels/Core/ChatAgentConfigViewModel/ChatAgentConfigViewModel.cs +++ b/src/Desktop/RodelAgent.UI/ViewModels/Core/ChatAgentConfigViewModel/ChatAgentConfigViewModel.cs @@ -47,6 +47,7 @@ public void SetData(ChatAgentItemViewModel data) { IsManualClose = false; Agent = data.Data; + CurrentOptions = Agent.Options; Name = data.Name; SystemInstruction = Agent.SystemInstruction; StopSequences.Clear(); @@ -247,10 +248,7 @@ private void UpdatePresetData() Agent.Options = options; - if (FilterCharacters.Count > 0) - { - Agent.FilterCharacters = [.. FilterCharacters]; - } + Agent.FilterCharacters = [.. FilterCharacters]; } private void CheckStep()