diff --git a/BeWo/BeWo.csproj b/BeWo/BeWo.csproj index 20f60862d..ac8bc20be 100644 --- a/BeWo/BeWo.csproj +++ b/BeWo/BeWo.csproj @@ -116,30 +116,47 @@ + + + + + + + + + + AiPromptbausteinPromptView.xaml + + + AiPromptbausteinFolderView.xaml + AiPromptbausteinDetailView.xaml WaitLayer3.xaml + + AiPromptbausteinComplexTreeView.xaml + AiPromptbausteinTreeView.xaml @@ -196,6 +213,14 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + Designer MSBuild:Compile @@ -204,6 +229,10 @@ Designer MSBuild:Compile + + MSBuild:Compile + Designer + Designer MSBuild:Compile diff --git a/BeWo/Services/AiWindowService.cs b/BeWo/Services/AiWindowService.cs new file mode 100644 index 000000000..aa9a96213 --- /dev/null +++ b/BeWo/Services/AiWindowService.cs @@ -0,0 +1,12 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BeWo.Services +{ + public class AiWindowService + { + } +} diff --git a/BeWo/Services/BeWoWindowService.cs b/BeWo/Services/BeWoWindowService.cs index 4cebaa5ff..e682ce98d 100644 --- a/BeWo/Services/BeWoWindowService.cs +++ b/BeWo/Services/BeWoWindowService.cs @@ -46,6 +46,30 @@ namespace BeWo.Services _controlFactory = controlFactory; } + public void Show(T windowViewModel) where T : WindowViewModel + { + if(windowViewModel is AiConversationChatViewModel viewModel) + { + ShowAiConversationWindow(viewModel); + } + else if (windowViewModel is AiPromptbausteinDetailViewModel viewModel2) + { + ShowAiPromptbausteinDetailWindow(viewModel2); + } + else if (windowViewModel is AiPromptbausteinFolderViewModel viewModel3) + { + ShowAiPromptbausteinFolderPopup(viewModel3); + } + else if(windowViewModel is AiPromptbausteinPromptViewModel viewModel4) + { + ShowAiPromptbausteinPromptPopup(viewModel4); + } + else + { + throw new NotImplementedException($"type not implemented: {typeof(T)}"); + } + } + public void ShowAiConversationWindow(AiConversationChatViewModel viewModel) { var control = _controlFactory.GetAiConversationControl(viewModel); @@ -57,7 +81,6 @@ namespace BeWo.Services }; Show(title, control, viewModel, options); } - public void ShowAiPromptbausteinDetailWindow(AiPromptbausteinDetailViewModel viewModel) { var control = new AiPromptbausteinDetailView(viewModel); @@ -68,7 +91,6 @@ namespace BeWo.Services }; Show("KI Promptbaustein", control, viewModel, options); } - public void ShowAiPromptbausteinSelectionWindow(AiPromptbausteinSelectionViewModel viewModel) { var control = new AiPromptbausteinSelectionView(viewModel); @@ -79,6 +101,27 @@ namespace BeWo.Services }; Show("KI Promptbaustein Auswahl", control, viewModel, options); } + public void ShowAiPromptbausteinFolderPopup(AiPromptbausteinFolderViewModel viewModel) + { + var control = new AiPromptbausteinFolderView(viewModel); + var options = new BeWoWindowOptions() + { + Height = 400, + Width = 600 + }; + Show("KI Promptbaustein Ordner", control, viewModel, options); + } + public void ShowAiPromptbausteinPromptPopup(AiPromptbausteinPromptViewModel viewModel) + { + var control = new AiPromptbausteinPromptView(viewModel); + var options = new BeWoWindowOptions() + { + Height = 400, + Width = 600 + }; + Show("KI Promptbaustein Prompt", control, viewModel, options); + } + public void ShowGkvAbrechnungDetailWindow(GkvAbrechnungDialogViewModel vm) { @@ -116,7 +159,7 @@ namespace BeWo.Services var control = _controlFactory.GetPdfViewer(pdf); Show(title, control, null, pOptions); } - + private void Show(string title, Control control, WindowViewModel windowViewModel, BeWoWindowOptions options) { if (options.ShowAsModal) diff --git a/BeWo/Services/IBeWoWindowService.cs b/BeWo/Services/IBeWoWindowService.cs index 31a3f0a39..ebb00c6d3 100644 --- a/BeWo/Services/IBeWoWindowService.cs +++ b/BeWo/Services/IBeWoWindowService.cs @@ -1,6 +1,6 @@ -using BeWo.View.Detail.AI; -using BeWo.ViewModel; +using BeWo.ViewModel; using BeWo.ViewModel.Light; +using BeWo.ViewModel.View; using BeWo.ViewModel.View.Administration; using BeWo.ViewModel.View.AI; using BeWo.ViewModel.View.Dialogs; @@ -36,5 +36,7 @@ namespace BeWo.Services void ShowTextViewerWindow(string title, string text, BeWoWindowOptions pOptions = null); void ShowPdfViewerWindow(string title, MemoryStream pdf, BeWoWindowOptions pOptions = null); #endregion + + void Show(T windowViewModel) where T : WindowViewModel; } } diff --git a/BeWo/Styles/DataTemplates/DataTemplates.xaml b/BeWo/Styles/DataTemplates/DataTemplates.xaml index bbe8041e0..33a2d6eb7 100644 --- a/BeWo/Styles/DataTemplates/DataTemplates.xaml +++ b/BeWo/Styles/DataTemplates/DataTemplates.xaml @@ -48,4 +48,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/BeWo/Styles/Designs/AI/IconKIChatWeissOrange.xaml b/BeWo/Styles/Designs/AI/IconKIChatWeissOrange.xaml index 381546faa..9af078b04 100644 --- a/BeWo/Styles/Designs/AI/IconKIChatWeissOrange.xaml +++ b/BeWo/Styles/Designs/AI/IconKIChatWeissOrange.xaml @@ -4,10 +4,10 @@ x:Key="AiDesignsIconKIChatWeissOrange" Stretch="Uniform"> + Name="svg15" + Width="257.1" + Height="255.97" + Background="Transparent"> @@ -16,25 +16,25 @@ + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Name="path6" + Fill="#FF5F00"> + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Name="path8" + Fill="#FFFFFF"> + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" + Name="path10" + Fill="#FFFFFF"> diff --git a/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml b/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml new file mode 100644 index 000000000..899711ad2 --- /dev/null +++ b/BeWo/View/Detail/AI/AiPromptbausteinComplexTreeView.xaml @@ -0,0 +1,150 @@ + + + + + + + + + + + Aktuell definierte KI-Prompts + + + + + + + + + + + + + + + + +