621 lines
34 KiB
XML
621 lines
34 KiB
XML
<localView:BeWoView
|
|
x:Class="BeWo.View.Detail.AI.AiConversationChatView"
|
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:ai="clr-namespace:BeWo.View.Detail.AI"
|
|
xmlns:core="clr-namespace:BS.Shared.Core;assembly=BS.Shared"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
|
|
xmlns:dxa="http://schemas.devexpress.com/winfx/2008/xaml/accordion"
|
|
xmlns:dxwui="http://schemas.devexpress.com/winfx/2008/xaml/windowsui"
|
|
xmlns:listviewmodel="clr-namespace:BeWo.ViewModel.ListViewModel"
|
|
xmlns:localView="clr-namespace:BeWo.View"
|
|
xmlns:markup="clr-namespace:BeWo.MultiLanguage.Markup"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:shared="clr-namespace:BS.Shared;assembly=BS.Shared"
|
|
xmlns:t="clr-namespace:BeWo.MultiLanguage.Markup"
|
|
xmlns:templateselectors="clr-namespace:BeWo.View.TemplateSelectors"
|
|
xmlns:uc="clr-namespace:BeWo.Controls;assembly=BeWo.Controls"
|
|
xmlns:viewmodel="clr-namespace:BeWo.ViewModel"
|
|
xmlns:vmv="clr-namespace:BeWo.ViewModel.View.AI"
|
|
x:Name="root"
|
|
Width="auto"
|
|
Height="auto"
|
|
MinWidth="600"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
d:DataContext="{d:DesignInstance Type=vmv:AiConversationChatViewModel,
|
|
IsDesignTimeCreatable=True}"
|
|
Focusable="True"
|
|
Loaded="BeWoView_Loaded"
|
|
mc:Ignorable="d">
|
|
<localView:BeWoView.Resources>
|
|
<ResourceDictionary>
|
|
<ResourceDictionary.MergedDictionaries>
|
|
<ResourceDictionary Source="..\..\..\Styles\ModernOrangeBlack.xaml" />
|
|
</ResourceDictionary.MergedDictionaries>
|
|
|
|
<!-- Conversation Control -->
|
|
<DataTemplate x:Key="ConversationTemplate">
|
|
<Border
|
|
Width="auto"
|
|
Margin="0,0,0,0"
|
|
HorizontalAlignment="Stretch"
|
|
Background="#CCF4F4F4"
|
|
BorderBrush="Black"
|
|
BorderThickness="0"
|
|
CornerRadius="10, 10, 10, 10">
|
|
<Grid Margin="8">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<TextBlock
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextForegroundPrimary}"
|
|
MouseDown="ConversationRenameTextBlock_MouseDown"
|
|
Text="{Binding Displayname}"
|
|
TextTrimming="CharacterEllipsis"
|
|
Visibility="{Binding IsEditing, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter=false}" />
|
|
<TextBox
|
|
Margin="0"
|
|
Padding="0"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
FontSize="14"
|
|
FontWeight="SemiBold"
|
|
Foreground="{DynamicResource TextForegroundPrimary}"
|
|
IsVisibleChanged="ConversationRenameTextBox_IsVisibleChanged"
|
|
KeyDown="ConversationRenameTextBox_KeyDown"
|
|
LostFocus="ConversationRenameTextBox_LostFocus"
|
|
Text="{Binding Displayname, UpdateSourceTrigger=PropertyChanged}"
|
|
Visibility="{Binding IsEditing, Converter={StaticResource BoolVisibilityConverter}}" />
|
|
<TextBlock
|
|
Grid.Row="1"
|
|
FontSize="11"
|
|
Foreground="{DynamicResource TextForegroundSecondary}"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding Created, StringFormat=Erstellt: {0:dd.MM.yy HH:mm}}" />
|
|
<TextBlock
|
|
Grid.Row="2"
|
|
FontSize="11"
|
|
Foreground="{DynamicResource TextForegroundSecondary}"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding Updated, StringFormat=Aktualisiert: {0:dd.MM.yy HH:mm}}" />
|
|
<TextBlock
|
|
Grid.Row="3"
|
|
FontSize="11"
|
|
Foreground="{DynamicResource TextForegroundSecondary}"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding Context_Type, StringFormat=Format: {0}}" />
|
|
<!--<TextBlock
|
|
Grid.Row="2"
|
|
FontSize="10"
|
|
FontWeight="Thin"
|
|
Style="{StaticResource TextBlockStyle}"
|
|
Text="{Binding Modell.ModelName, StringFormat=Modell: {0}}" />-->
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</ResourceDictionary>
|
|
|
|
</localView:BeWoView.Resources>
|
|
<Grid>
|
|
<GroupBox x:Name="rootgroupbox" Style="{StaticResource ModuleAiControlZeiterfassungStyle}">
|
|
<GroupBox.Header>
|
|
<StackPanel
|
|
Grid.Row="0"
|
|
Margin="0"
|
|
Orientation="Horizontal">
|
|
<!--<Label
|
|
Margin="0,0,0,0"
|
|
Padding="2"
|
|
Content="Suche"
|
|
FontSize="14"
|
|
Foreground="#FFFFFFFF" />
|
|
<TextBox
|
|
x:Name="textbox_search"
|
|
Width="300"
|
|
Height="20"
|
|
MinWidth="90"
|
|
Margin="4,0,0,0"
|
|
BorderThickness="0,0,0,0"
|
|
IsEnabled="False"
|
|
TabIndex="0"
|
|
Template="{DynamicResource SearchTextBoxTemplate}" />
|
|
<Button
|
|
x:Name="ReloadButton"
|
|
Width="36"
|
|
Height="24"
|
|
Margin="8,0,0,0"
|
|
Command="{Binding ReloadConversationsCommand, RelativeSource={RelativeSource AncestorType={x:Type localView:BeWoView}, Mode=FindAncestor}}"
|
|
ToolTip="Liste aktualisieren">
|
|
<Button.Template>
|
|
<ControlTemplate TargetType="{x:Type Button}">
|
|
<Grid>
|
|
<Image x:Name="imgDisabled" Source="..\..\Ressources\Icons\SymbolRefresh32Disabled.png" />
|
|
<Image
|
|
x:Name="imgEnabled"
|
|
Opacity="0"
|
|
Source="..\..\Ressources\Icons\SymbolRefresh32.png" />
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="true">
|
|
<Setter TargetName="imgEnabled" Property="Opacity" Value="1" />
|
|
</Trigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Button.Template>
|
|
</Button>-->
|
|
</StackPanel>
|
|
</GroupBox.Header>
|
|
|
|
<Grid Margin="0,0,0,0">
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="Auto" />
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="Auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid Grid.Row="1">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="200" />
|
|
<ColumnDefinition Width="*" MinWidth="200" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
</Grid.RowDefinitions>
|
|
|
|
<!--<dxwui:HamburgerMenu
|
|
Background="Transparent"
|
|
ItemTemplate="{StaticResource ConversationHamburgerMenuItemTemplate}"
|
|
ItemsSource="{Binding VMList}">
|
|
<dxwui:HamburgerMenu.Content>
|
|
|
|
<dxwui:HamburgerMenuNavigationButton />
|
|
</dxwui:HamburgerMenu.Content>
|
|
</dxwui:HamburgerMenu>-->
|
|
|
|
<Grid>
|
|
<ListView
|
|
x:Name="listview_conversations"
|
|
Padding="4"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
ItemTemplate="{StaticResource ConversationTemplate}"
|
|
ItemsSource="{Binding ListVM.VMList}"
|
|
ScrollViewer.CanContentScroll="False"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
SelectedItem="{Binding ListVM.SelectedVM, Mode=TwoWay}"
|
|
SelectionChanged="listview_conversations_SelectionChanged">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="ListBoxItem">
|
|
<Grid Margin="0,1,0,1">
|
|
<Border
|
|
x:Name="ItemBorder"
|
|
MinHeight="20"
|
|
Background="#FF000000"
|
|
CornerRadius="5">
|
|
<Border.OpacityMask>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#00000000" />
|
|
<GradientStop Offset="1" Color="#00000000" />
|
|
</LinearGradientBrush>
|
|
</Border.OpacityMask>
|
|
|
|
</Border>
|
|
<Border
|
|
Name="ItemContent"
|
|
Padding="1"
|
|
SnapsToDevicePixels="true">
|
|
<ContentPresenter />
|
|
</Border>
|
|
</Grid>
|
|
<ControlTemplate.Triggers>
|
|
<Trigger Property="IsMouseOver" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#33000000" />
|
|
<GradientStop Offset="1" Color="#66000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<Trigger Property="ListBoxItem.IsSelected" Value="True">
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#CC000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Trigger>
|
|
<MultiTrigger>
|
|
<MultiTrigger.Conditions>
|
|
<Condition Property="ListBoxItem.IsSelected" Value="True" />
|
|
<Condition Property="Selector.IsSelectionActive" Value="False" />
|
|
</MultiTrigger.Conditions>
|
|
<Setter TargetName="ItemBorder" Property="OpacityMask">
|
|
<Setter.Value>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<GradientStop Offset="0" Color="#99000000" />
|
|
<GradientStop Offset="1" Color="#B2000000" />
|
|
</LinearGradientBrush>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</MultiTrigger>
|
|
</ControlTemplate.Triggers>
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
</ListView>
|
|
</Grid>
|
|
|
|
<Grid Grid.Column="1" PreviewKeyDown="Grid_PreviewKeyDown">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="1000000*" MaxWidth="12000" />
|
|
<ColumnDefinition Width="*" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<ListView
|
|
x:Name="listview_messages"
|
|
Grid.Column="1"
|
|
Padding="3"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
ItemTemplateSelector="{StaticResource AiConversationMessageTemplateSelector}"
|
|
ItemsSource="{Binding ListVM.SelectedVM.Messages.VMList, UpdateSourceTrigger=PropertyChanged}"
|
|
ScrollViewer.CanContentScroll="False"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
|
Tag="{Binding DataContext, ElementName=root}"
|
|
Visibility="{Binding IsNewConversationVisible, Converter={StaticResource BoolVisibilityConverter}, ConverterParameter=Reverse}">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Padding" Value="4" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
|
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
<ListView.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical" />
|
|
</ItemsPanelTemplate>
|
|
</ListView.ItemsPanel>
|
|
</ListView>
|
|
<Grid
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Margin="4">
|
|
<Grid.Visibility>
|
|
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
|
<Binding Converter="{StaticResource BoolReverseConverter}" Path="IsNewConversationVisible" />
|
|
</MultiBinding>
|
|
</Grid.Visibility>
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<!--<TextBox
|
|
x:Name="txt_input_context"
|
|
Height="100"
|
|
MaxHeight="200"
|
|
Margin="5"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Stretch"
|
|
AcceptsReturn="True"
|
|
Visibility="Collapsed"
|
|
Text="{Binding Context_Input}" />-->
|
|
<TextBox
|
|
x:Name="txt_input_message"
|
|
Grid.Column="1"
|
|
Height="auto"
|
|
MaxHeight="200"
|
|
Margin="0,0,4,0"
|
|
HorizontalAlignment="Stretch"
|
|
AcceptsReturn="True"
|
|
IsReadOnly="{Binding IsSending}"
|
|
Text="{Binding MessageInput, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Button
|
|
Grid.Column="2"
|
|
Height="auto"
|
|
MinHeight="25"
|
|
MaxHeight="100"
|
|
Margin="0"
|
|
VerticalAlignment="Stretch"
|
|
Command="{Binding SendNewMessageCommand}"
|
|
Content="Senden"
|
|
Visibility="Visible" />
|
|
</Grid>
|
|
<Grid
|
|
Grid.RowSpan="2"
|
|
Grid.Column="1"
|
|
Margin="4">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="0" />
|
|
<ColumnDefinition Width="*" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<Grid.Visibility>
|
|
<MultiBinding Converter="{StaticResource BooleanAndVisibilityMultiConverter}">
|
|
<Binding Path="IsNewConversationVisible" />
|
|
</MultiBinding>
|
|
</Grid.Visibility>
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
HorizontalAlignment="Center"
|
|
VerticalAlignment="Center">
|
|
<TextBlock
|
|
FontSize="12"
|
|
FontWeight="Medium"
|
|
Foreground="Black">
|
|
Bitte formulieren Sie eine Frage, um einen neuen Chat zu beginnen.<LineBreak />
|
|
Weitere Details erfahren Sie in der Hilfe.<Hyperlink NavigateUri="https://help.bewoplaner.de" RequestNavigate="Hyperlink_RequestNavigate">
|
|
(i)
|
|
</Hyperlink>
|
|
</TextBlock>
|
|
</StackPanel>
|
|
|
|
<TextBox
|
|
x:Name="txt_input_message2"
|
|
Grid.Row="1"
|
|
Grid.Column="1"
|
|
Height="auto"
|
|
MaxHeight="200"
|
|
Margin="0,0,4,0"
|
|
HorizontalAlignment="Stretch"
|
|
AcceptsReturn="True"
|
|
IsReadOnly="{Binding IsSending}"
|
|
Text="{Binding MessageInput, UpdateSourceTrigger=PropertyChanged}" />
|
|
<Button
|
|
Grid.Row="1"
|
|
Grid.Column="2"
|
|
Height="auto"
|
|
MinHeight="25"
|
|
MaxHeight="100"
|
|
Margin="0"
|
|
VerticalAlignment="Stretch"
|
|
Command="{Binding StartConversationWithMessageCommand}"
|
|
Content="Senden"
|
|
Visibility="Visible" />
|
|
</Grid>
|
|
</Grid>
|
|
</Grid>
|
|
<Border
|
|
Grid.Row="2"
|
|
Height="35"
|
|
Margin="0,0,0,0"
|
|
VerticalAlignment="Stretch">
|
|
<Grid>
|
|
<Grid.Resources>
|
|
<Style BasedOn="{StaticResource PopupToolbarButtonSmallStyle}" TargetType="Button" />
|
|
</Grid.Resources>
|
|
<Rectangle Fill="#FF000000">
|
|
<Rectangle.OpacityMask>
|
|
<LinearGradientBrush StartPoint="0.5,0" EndPoint="0.5,1">
|
|
<!--<GradientStop Offset="0" Color="#33000000" />
|
|
<GradientStop Offset="1" Color="#99FFFFFF" />-->
|
|
<GradientStop Offset="0" Color="#19000000" />
|
|
<GradientStop Offset="1" Color="#33FFFFFF" />
|
|
</LinearGradientBrush>
|
|
</Rectangle.OpacityMask>
|
|
</Rectangle>
|
|
<StackPanel
|
|
Height="Auto"
|
|
Margin="5,5,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
x:Name="btnNew"
|
|
Margin="0,0,0,0"
|
|
Command="{Binding OpenNewConversationCommand}"
|
|
Content="Neuer Chat" />
|
|
<Button
|
|
x:Name="btnSettings"
|
|
Margin="4,0,0,0"
|
|
Command="{Binding OpenSettingCommand}"
|
|
Content="Einstellungen" />
|
|
<Button
|
|
x:Name="btnTest"
|
|
Margin="4,0,0,0"
|
|
Command="{Binding TestCommand}"
|
|
Content="Test Szenario"
|
|
Visibility="Collapsed" />
|
|
<Button
|
|
x:Name="btnRename"
|
|
Margin="4,0,0,0"
|
|
Command="{Binding RenameCommand}"
|
|
Content="Umbennen" />
|
|
<Button
|
|
x:Name="btnClone"
|
|
Margin="4,0,0,0"
|
|
Command="{Binding OpenCloneCommand}"
|
|
Content="Klonen" />
|
|
<Button
|
|
x:Name="btnDelete"
|
|
Margin="4,0,0,0"
|
|
Command="{Binding AskDeleteCommand}"
|
|
Content="Löschen" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Height="Auto"
|
|
Margin="5,5,5,0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<Button
|
|
x:Name="btnClose"
|
|
Height="25"
|
|
Margin="0,0,0,0"
|
|
Command="ApplicationCommands.Close"
|
|
Content="Schließen"
|
|
FontWeight="Medium"
|
|
Style="{StaticResource NavigationToolbarButtonStyle}"
|
|
Visibility="Collapsed" />
|
|
|
|
<TextBlock
|
|
Margin="0"
|
|
FontSize="10"
|
|
Foreground="#FFFDFDFD">
|
|
Dieses System verwendet KI.<LineBreak />
|
|
KI-generierte Inhalte sind zu prüfen.</TextBlock>
|
|
</StackPanel>
|
|
</Grid>
|
|
</Border>
|
|
<Popup
|
|
x:Name="popup_newview"
|
|
Width="200"
|
|
Height="200"
|
|
StaysOpen="True">
|
|
<Grid Margin="5" Background="Orange">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<Label>Kontext</Label>
|
|
<ComboBox Grid.Column="1" />
|
|
</Grid>
|
|
</Popup>
|
|
<Popup
|
|
x:Name="popup_settings"
|
|
Width="auto"
|
|
Height="auto"
|
|
AllowsTransparency="True"
|
|
IsOpen="{Binding IsSettingsOpen}"
|
|
Placement="Center"
|
|
StaysOpen="False">
|
|
<Border
|
|
Padding="5"
|
|
Background="{DynamicResource NavigationContentBrush}"
|
|
BorderBrush="Black"
|
|
BorderThickness="1"
|
|
CornerRadius="5">
|
|
<ai:AiConfigView />
|
|
</Border>
|
|
|
|
|
|
<!--<Grid Margin="5" Background="Orange">
|
|
<Grid.ColumnDefinitions>
|
|
<ColumnDefinition Width="auto" />
|
|
<ColumnDefinition Width="auto" />
|
|
</Grid.ColumnDefinitions>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="auto" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<Label>Modell:</Label>
|
|
<ComboBox
|
|
Grid.Column="1"
|
|
ItemsSource="{Binding Models}"
|
|
SelectedItem="{Binding Config.SelectedModel, Mode=TwoWay}" />
|
|
</Grid>-->
|
|
</Popup>
|
|
<Popup
|
|
x:Name="popup_conversation_clone"
|
|
IsOpen="{Binding IsCloneOpen}"
|
|
Loaded="popup_conversation_clone_Loaded"
|
|
Placement="Center"
|
|
StaysOpen="False">
|
|
<Border
|
|
Width="400"
|
|
Height="600"
|
|
Padding="0"
|
|
Background="{DynamicResource NavigationContentBrush}"
|
|
BorderThickness="1"
|
|
CornerRadius="5">
|
|
<Grid>
|
|
<Grid.RowDefinitions>
|
|
<RowDefinition Height="*" />
|
|
<RowDefinition Height="auto" />
|
|
</Grid.RowDefinitions>
|
|
<ListView
|
|
x:Name="listbox_messages_clone"
|
|
Padding="3"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
ItemTemplateSelector="{StaticResource AiConversationCloneMessageTemplateSelector}"
|
|
ItemsSource="{Binding ListVM.SelectedVM.Messages.VMList, UpdateSourceTrigger=PropertyChanged}"
|
|
ScrollViewer.CanContentScroll="False"
|
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled">
|
|
<ListView.ItemContainerStyle>
|
|
<Style TargetType="ListViewItem">
|
|
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
|
|
<Setter Property="Padding" Value="4" />
|
|
<Setter Property="BorderThickness" Value="0" />
|
|
<Setter Property="Template">
|
|
<Setter.Value>
|
|
<ControlTemplate TargetType="{x:Type ListViewItem}">
|
|
<ContentPresenter Margin="{TemplateBinding Padding}" />
|
|
</ControlTemplate>
|
|
</Setter.Value>
|
|
</Setter>
|
|
</Style>
|
|
</ListView.ItemContainerStyle>
|
|
<ListView.ItemsPanel>
|
|
<ItemsPanelTemplate>
|
|
<StackPanel Orientation="Vertical" />
|
|
</ItemsPanelTemplate>
|
|
</ListView.ItemsPanel>
|
|
</ListView>
|
|
<Button
|
|
Grid.Row="1"
|
|
Margin="8,4,8,8"
|
|
Command="{Binding CloneCommand}">
|
|
Klonen
|
|
</Button>
|
|
</Grid>
|
|
</Border>
|
|
<!-- AiConversationCloneMessageTemplateSelector -->
|
|
|
|
</Popup>
|
|
<Popup
|
|
x:Name="popup_message_save"
|
|
IsOpen="{Binding IsSavePromptOpen}"
|
|
Placement="Mouse"
|
|
PlacementTarget="{Binding ElementName=root}"
|
|
StaysOpen="False">
|
|
<Border BorderBrush="Black" BorderThickness="1">
|
|
<ai:AiPromptbausteinPromptView2
|
|
CancelCommand="{Binding CancelSavePromptCommand}"
|
|
PromptVM="{Binding SavePromptVM}"
|
|
SaveCommand="{Binding AcceptSavePromptCommand}" />
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
</GroupBox>
|
|
</Grid>
|
|
</localView:BeWoView>
|