diff --git a/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml b/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml
index 7c82f408..f4f091b2 100644
--- a/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml
+++ b/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml
@@ -39,6 +39,11 @@
+
+
+
+
+
diff --git a/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml.cs b/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml.cs
index 86ad2155..1fcedcf3 100644
--- a/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml.cs
+++ b/src/Desktop/RodelAgent.UI/Controls/Chat/AgentsSection.xaml.cs
@@ -32,4 +32,13 @@ private void OnEditItemClick(object sender, RoutedEventArgs e)
ViewModel.EditAgentCommand.Execute(vm);
}
}
+
+ private void OnCreateCopyItemClick(object sender, RoutedEventArgs e)
+ {
+ var vm = (sender as FrameworkElement)?.DataContext as ViewModels.Items.ChatPresetItemViewModel;
+ if (vm != null)
+ {
+ ViewModel.CreateAgentCopyCommand.Execute(vm);
+ }
+ }
}
diff --git a/src/Desktop/RodelAgent.UI/Resources/en-US/Resources.resw b/src/Desktop/RodelAgent.UI/Resources/en-US/Resources.resw
index 96c5bb65..6fa579fb 100644
--- a/src/Desktop/RodelAgent.UI/Resources/en-US/Resources.resw
+++ b/src/Desktop/RodelAgent.UI/Resources/en-US/Resources.resw
@@ -256,7 +256,7 @@
Keep plugin
- Unable to load the assistant. The corresponding service may have been deregistered. Please check and try again.
+ Unable to load the agent. The corresponding service may have been deregistered. Please check and try again.
Unable to load the local model. The model may have been deleted or the default preset is missing. Please try deleting and re-importing the model.
@@ -286,7 +286,7 @@
Conversation turn
- Choose a service or assistant
+ Choose a service or agent
Start a constructive conversation!
@@ -363,6 +363,9 @@
Create
+
+ Create copy
+
Create custom model
@@ -611,7 +614,7 @@ You can manually adjust the limit, and the application will capture the specifie
Modify
- Modify assistant
+ Modify agent
Modify custom model
@@ -662,7 +665,7 @@ You can manually adjust the limit, and the application will capture the specifie
Next step
- No available assistants
+ No available agents
No audio records yet, go generate one~
diff --git a/src/Desktop/RodelAgent.UI/Resources/zh-Hans-CN/Resources.resw b/src/Desktop/RodelAgent.UI/Resources/zh-Hans-CN/Resources.resw
index 07126c2b..422b5719 100644
--- a/src/Desktop/RodelAgent.UI/Resources/zh-Hans-CN/Resources.resw
+++ b/src/Desktop/RodelAgent.UI/Resources/zh-Hans-CN/Resources.resw
@@ -363,6 +363,9 @@
创建
+
+ 创建副本
+
创建自定义模型
diff --git a/src/Desktop/RodelAgent.UI/ViewModels/Pages/ChatServicePageViewModel/ChatServicePageViewModel.Agents.cs b/src/Desktop/RodelAgent.UI/ViewModels/Pages/ChatServicePageViewModel/ChatServicePageViewModel.Agents.cs
index 7c2e0271..6d53d53d 100644
--- a/src/Desktop/RodelAgent.UI/ViewModels/Pages/ChatServicePageViewModel/ChatServicePageViewModel.Agents.cs
+++ b/src/Desktop/RodelAgent.UI/ViewModels/Pages/ChatServicePageViewModel/ChatServicePageViewModel.Agents.cs
@@ -66,6 +66,30 @@ private async Task AddAgentAsync()
IsAgentsEmpty = AgentPresets.Count == 0;
}
+ [RelayCommand]
+ private async Task CreateAgentCopyAsync(ChatPresetItemViewModel presetVM)
+ {
+ var tempAgent = presetVM.Data.Clone();
+ tempAgent.Id = Guid.NewGuid().ToString("N");
+
+ var vm = new ChatPresetItemViewModel(tempAgent);
+ _presetModuleVM.SetData(vm, ChatSessionPresetType.Agent);
+ var dialog = new ChatPresetSettingsDialog();
+ await dialog.ShowAsync();
+
+ var preset = dialog.ViewModel.Data;
+ if (preset is not null && !_presetModuleVM.IsManualClose)
+ {
+ if (!AgentPresets.Any(p => p.Data.Id == preset.Data.Id))
+ {
+ AgentPresets.Add(new ChatPresetItemViewModel(preset.Data));
+ await _storageService.AddOrUpdateChatAgentAsync(preset.Data);
+ }
+ }
+
+ IsAgentsEmpty = AgentPresets.Count == 0;
+ }
+
[RelayCommand]
private async Task SetSelectedAgentAsync(ChatPresetItemViewModel presetVM)
{