Promptbaustein -> Prompt-Baustein

This commit is contained in:
2026-03-10 15:37:42 +01:00
parent dd44beff10
commit 7133d09138
6 changed files with 285 additions and 160 deletions

View File

@@ -35,7 +35,7 @@
Click="btnOpenAi5_Click"
Content="{StaticResource AiDesignsIconKIFunktionWeissGruen}"
Style="{StaticResource NavigationToolbarButtonStyle}"
ToolTip="KI Chat mit Promptbaustein starten"
ToolTip="KI Chat mit Prompt-Baustein starten"
ToolTipService.ShowOnDisabled="True" />
<Image
x:Name="imgWarning"

View File

@@ -31,17 +31,17 @@
</UserControl.Resources>
<StackPanel>
<TextBlock
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Text="KI Module Einstellungen"
Foreground="#FFFFFF"/>
HorizontalAlignment="Left"
FontFamily="Microsoft Sans Serif"
FontSize="14"
Foreground="#FFFFFF"
Text="KI Module Einstellungen" />
<Path
Margin="0,3,0,0"
Data="M 0,0 H 370"
Fill="{DynamicResource BorderBrush}"
Stroke="{DynamicResource BorderBrush}"
StrokeThickness="2" />
Margin="0,3,0,0"
Data="M 0,0 H 370"
Fill="{DynamicResource BorderBrush}"
Stroke="{DynamicResource BorderBrush}"
StrokeThickness="2" />
<Grid Margin="16" HorizontalAlignment="Stretch">
<!--<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" SharedSizeGroup="ai1" />
@@ -67,37 +67,37 @@
Ausgewähltes Modell
</Label>
<ComboBox
Grid.Column="2"
ItemsSource="{Binding Models}"
SelectedItem="{Binding Config.SelectedModel}" />
Grid.Column="2"
ItemsSource="{Binding Models}"
SelectedItem="{Binding Config.SelectedModel}" />
<Label Grid.Row="1" IsEnabled="False">
Temperatur
</Label>
<Slider
Grid.Row="1"
Grid.Column="2"
IsEnabled="False"
Value="{Binding Config.Temperature}" />
Grid.Row="1"
Grid.Column="2"
IsEnabled="False"
Value="{Binding Config.Temperature}" />
<Label Grid.Row="2" IsEnabled="False">
top__p
</Label>
<Slider
Grid.Row="2"
Grid.Column="2"
IsEnabled="False"
Value="{Binding Config.Top_P}" />
Grid.Row="2"
Grid.Column="2"
IsEnabled="False"
Value="{Binding Config.Top_P}" />
<Label Grid.Row="3" IsEnabled="False">
max__gen__len
</Label>
<dxe:TextEdit
Grid.Row="3"
Grid.Column="2"
EditValue="{Binding Config.Max_Gen_Len}"
IsEnabled="False"
Style="{StaticResource TextEditNumber}" />
Grid.Row="3"
Grid.Column="2"
EditValue="{Binding Config.Max_Gen_Len}"
IsEnabled="False"
Style="{StaticResource TextEditNumber}" />
<Label Grid.Row="4" VerticalAlignment="Top">
Datenformat

View File

@@ -1,42 +1,61 @@
<localView:BeWoView x:Class="BeWo.View.Detail.OwnChatSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
Height="Auto" Width="Auto" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" Focusable="True">
<Grid x:Name="root">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<GroupBox Margin="3 10 3 3" Grid.Row="1" Grid.ColumnSpan="2" Header="{markup:Translate ownChat Einstellungen}" Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<localView:BeWoView
x:Class="BeWo.View.Detail.OwnChatSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<Grid x:Name="root">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Button Name="button_showSettings" Click="button_showSettings_Click" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Height="25" Margin="3,10,3,3" Padding="5,0,5,1" HorizontalAlignment="Left" Content="{markup:Translate ownChat Einstellungen verwalten}"/>
<GroupBox
Grid.Row="1"
Grid.ColumnSpan="2"
Margin="3,10,3,3"
Header="{markup:Translate ownChat Einstellungen}"
Style="{StaticResource ObjectEditGroupBox}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" SharedSizeGroup="g1" />
<ColumnDefinition Width="150" />
</Grid.ColumnDefinitions>
<Button
Name="button_showSettings"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="2"
Height="25"
Margin="3,10,3,3"
Padding="5,0,5,1"
HorizontalAlignment="Left"
Click="button_showSettings_Click"
Content="{markup:Translate ownChat Einstellungen verwalten}" />
</Grid>
</GroupBox>
</GroupBox>
</Grid>
</Grid>
</localView:BeWoView>

View File

@@ -1,96 +1,202 @@
<localView:BeWoView
x:Class="BeWo.View.Detail.SchedulerSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:val="clr-namespace:BeWo.Validation"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase" xmlns:localView="clr-namespace:BeWo.View" Height="Auto" Width="Auto" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Focusable="True">
<GroupBox x:Name="root" Header="Einstellungen für Termine" Style="{StaticResource ObjectEditGroupBox}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.Resources>
<DataTemplate x:Key="DropDownItemTemplate">
<Border Height="20" MinWidth="20" Background="{Binding}" BorderThickness="1" CornerRadius="2" HorizontalAlignment="Stretch" BorderBrush="Black" />
</DataTemplate>
<DataTemplate x:Key="SelectedItemTemplate">
<Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{Binding}" BorderBrush="Black" BorderThickness="1" />
</DataTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<localView:BeWoView
x:Class="BeWo.View.Detail.SchedulerSettingsView"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:diagnostics="clr-namespace:System.Diagnostics;assembly=WindowsBase"
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid"
xmlns:localView="clr-namespace:BeWo.View"
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
xmlns:val="clr-namespace:BeWo.Validation"
Width="Auto"
Height="Auto"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Focusable="True">
<GroupBox
x:Name="root"
Header="Einstellungen für Termine"
Style="{StaticResource ObjectEditGroupBox}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid.Resources>
<DataTemplate x:Key="DropDownItemTemplate">
<Border
Height="20"
MinWidth="20"
HorizontalAlignment="Stretch"
Background="{Binding}"
BorderBrush="Black"
BorderThickness="1"
CornerRadius="2" />
</DataTemplate>
<DataTemplate x:Key="SelectedItemTemplate">
<Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{Binding}"
BorderBrush="Black"
BorderThickness="1" />
</DataTemplate>
</Grid.Resources>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Column="0" Grid.Row="0">Bezeichnung</Label>
<TextBox Grid.Column="1" Grid.Row="0" Margin="3" Height="23" Width="200" Text="{val:ValidationBinding Path=NewVM.DisplayName, UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Column="2" Grid.Row="0">
Farbe im Belegungsplan
</Label>
<ComboBox HorizontalContentAlignment="Stretch" Width="50" VerticalContentAlignment="Stretch" SelectedItem="{val:ValidationBinding Path=NewVM.Brush}" Name="combobox_brush" Grid.Column="3" Grid.Row="0" Height="23" Margin="3" ItemsSource="{Binding Path=AllBrushes, Mode=OneWay}">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="12" Rows="12" IsItemsHost="True" />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Margin" Value="2" />
<Setter Property="Padding" Value="0" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<Button Name="button_addAppointmentCategory" HorizontalAlignment="Left" FontWeight="Normal" Grid.Column="4" Grid.Row="0" Height="25" Margin="20 3 3 3" Padding="5 0" Click="button_addAppointmentCategory_Click" IsDefault="True">Hinzufügen</Button>
<dxg:GridControl x:Name="datagrid_categorys" Margin="0,10,0,0" Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="5" DataSource="{Binding VMList}">
<dxg:GridControl.Columns>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Grid.Column="0">Bezeichnung</Label>
<TextBox
Grid.Row="0"
Grid.Column="1"
Width="200"
Height="23"
Margin="3"
Text="{val:ValidationBinding Path=NewVM.DisplayName,
UpdateSourceTrigger=PropertyChanged}" />
<Label Grid.Row="0" Grid.Column="2">
Farbe im Belegungsplan
</Label>
<ComboBox
Name="combobox_brush"
Grid.Row="0"
Grid.Column="3"
Width="50"
Height="23"
Margin="3"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch"
ItemsSource="{Binding Path=AllBrushes, Mode=OneWay}"
SelectedItem="{val:ValidationBinding Path=NewVM.Brush}">
<ComboBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid
Columns="12"
IsItemsHost="True"
Rows="12" />
</ItemsPanelTemplate>
</ComboBox.ItemsPanel>
<ComboBox.ItemContainerStyle>
<Style TargetType="{x:Type ComboBoxItem}">
<Setter Property="Margin" Value="2" />
<Setter Property="Padding" Value="0" />
</Style>
</ComboBox.ItemContainerStyle>
</ComboBox>
<Button
Name="button_addAppointmentCategory"
Grid.Row="0"
Grid.Column="4"
Height="25"
Margin="20,3,3,3"
Padding="5,0"
HorizontalAlignment="Left"
Click="button_addAppointmentCategory_Click"
FontWeight="Normal"
IsDefault="True">
Hinzufügen
</Button>
<dxg:GridControl
x:Name="datagrid_categorys"
Grid.Row="1"
Grid.Column="0"
Grid.ColumnSpan="5"
Margin="0,10,0,0"
DataSource="{Binding VMList}">
<dxg:GridControl.Columns>
<dxg:GridColumn FieldName="IsDeleteable" Header="" FixedWidth="True" Width="24" ReadOnly="True">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button Content="r" Click="DeleteButton_Click" Visibility="{Binding Path=EditValue, Converter={StaticResource BoolVisibilityConverter}}" FontFamily="Webdings" Width="18" Height="18" VerticalAlignment="Center" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn FieldName="DisplayName" Header="Bezeichnung" Width="200" />
<dxg:GridColumn x:Name="column_Color" FieldName="Brush" Header="Farbe" Width="40">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<Border HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{Binding Value, diagnostics:PresentationTraceSources.TraceLevel=High }" BorderBrush="Black" BorderThickness="1" />
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<Button x:Name="PART_Editor" BorderThickness="0" Style="{x:Null}" Background="{Binding EditValue}" Foreground="{Binding EditValue}" Height="21" HorizontalAlignment="Stretch" Click="button_select_color_Click"></Button>
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView AutoWidth="true" ShowGroupPanel="False" ShowGroupedColumns="false" ShowTotalSummary="False" NavigationStyle="Cell" />
</dxg:GridControl.View>
</dxg:GridControl>
<Popup x:Name="popup_color" StaysOpen="false" Placement="MousePoint">
<ListBox x:Name="listbox_colorpicker" BorderThickness="0" Loaded="colorEditor_Loaded" SelectionChanged="listbox_colorpicker_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid Columns="12" Rows="12" IsItemsHost="True" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Margin" Value="2" />
<Setter Property="Padding" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Popup>
</Grid>
</GroupBox>
<dxg:GridColumn
Width="24"
FieldName="IsDeleteable"
FixedWidth="True"
Header=""
ReadOnly="True">
<dxg:GridColumn.CellTemplate>
<DataTemplate>
<Button
Width="18"
Height="18"
VerticalAlignment="Center"
Click="DeleteButton_Click"
Content="r"
FontFamily="Webdings"
Visibility="{Binding Path=EditValue, Converter={StaticResource BoolVisibilityConverter}}" />
</DataTemplate>
</dxg:GridColumn.CellTemplate>
</dxg:GridColumn>
<dxg:GridColumn
Width="200"
FieldName="DisplayName"
Header="Bezeichnung" />
<dxg:GridColumn
x:Name="column_Color"
Width="40"
FieldName="Brush"
Header="Farbe">
<dxg:GridColumn.DisplayTemplate>
<ControlTemplate>
<Border
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{Binding Value, diagnostics:PresentationTraceSources.TraceLevel=High}"
BorderBrush="Black"
BorderThickness="1" />
</ControlTemplate>
</dxg:GridColumn.DisplayTemplate>
<dxg:GridColumn.EditTemplate>
<ControlTemplate>
<Button
x:Name="PART_Editor"
Height="21"
HorizontalAlignment="Stretch"
Background="{Binding EditValue}"
BorderThickness="0"
Click="button_select_color_Click"
Foreground="{Binding EditValue}"
Style="{x:Null}" />
</ControlTemplate>
</dxg:GridColumn.EditTemplate>
</dxg:GridColumn>
</dxg:GridControl.Columns>
<dxg:GridControl.View>
<dxg:TableView
AutoWidth="true"
NavigationStyle="Cell"
ShowGroupPanel="False"
ShowGroupedColumns="false"
ShowTotalSummary="False" />
</dxg:GridControl.View>
</dxg:GridControl>
<Popup
x:Name="popup_color"
Placement="MousePoint"
StaysOpen="false">
<ListBox
x:Name="listbox_colorpicker"
BorderThickness="0"
Loaded="colorEditor_Loaded"
SelectionChanged="listbox_colorpicker_SelectionChanged">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid
Columns="12"
IsItemsHost="True"
Rows="12" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
<ListBox.ItemContainerStyle>
<Style TargetType="{x:Type ListBoxItem}">
<Setter Property="Margin" Value="2" />
<Setter Property="Padding" Value="0" />
</Style>
</ListBox.ItemContainerStyle>
</ListBox>
</Popup>
</Grid>
</GroupBox>
</localView:BeWoView>

View File

@@ -339,7 +339,7 @@
<dxa:AccordionItem
Name="TabitemAiPromptbausteineComplexTree3"
Foreground="Black"
Header="{markup:Translate Promptbausteine}"
Header="{markup:Translate Prompt-Bausteine}"
IsEnabled="{Binding Converter={StaticResource UserPermission2BoolConverter}, ConverterParameter={x:Static shared:UserRightType.AiModulePromptbausteineView}}">
<dxa:AccordionItem
Name="TabitemAiPromptbausteineComplexTree"

View File

@@ -784,13 +784,13 @@ namespace BS.Shared.Core
//dict.Add(UserRightType.AiModuleChatDelete, Translator.Translate($"KI-Konversationen/Nachrichten {action_keywords[4]}"));
//dict.Add(UserRightType.AiModuleViewSetting, Translator.Translate($"KI-Einstellungen {action_keywords[0]}"));
dict.Add(UserRightType.AiModulePromptbausteineView, Translator.Translate($"KI-Promptbausteine {action_keywords[0]}"));
dict.Add(UserRightType.AiModulePromptbausteineView, Translator.Translate($"KI-Prompt-Bausteine {action_keywords[0]}"));
//dict.Add(UserRightType.AiModulePromptbausteineAdd, Translator.Translate($"KI-Promptbaustein {action_keywords[2]}"));
dict.Add(UserRightType.AiModulePromptbausteineEdit, Translator.Translate($"KI-Promptbaustein {action_keywords[3]}"));
dict.Add(UserRightType.AiModulePromptbausteineEdit, Translator.Translate($"KI-Prompt-Baustein {action_keywords[3]}"));
//dict.Add(UserRightType.AiModulePromptbausteineRemove, Translator.Translate($"KI-Promptbaustein {action_keywords[4]}"));
//dict.Add(UserRightType.AiModulePromptbausteineSeeAll, Translator.Translate($"KI-Promptbausteine {action_keywords[7]}"));
//dict.Add(UserRightType.AiModulePromptbausteineExecute, Translator.Translate($"KI-Promptbausteine {action_keywords[8]}"));
dict.Add(UserRightType.AiModulePromptbausteinShare, Translator.Translate($"KI-Promptbausteine freigeben"));
dict.Add(UserRightType.AiModulePromptbausteinShare, Translator.Translate($"KI-Prompt-Bausteine freigeben"));
dict.Add(UserRightType.AiModuleServiceRecordChat, Translator.Translate($"Zeiterfassung -> KI Chat nutzen"));
dict.Add(UserRightType.AiModuleServiceRecordDocu, Translator.Translate($"Zeiterfassung -> KI für Dokumentation nutzen"));