GTPCorrgir/Chat.xaml

62 lines
3.1 KiB
Plaintext
Raw Normal View History

2024-11-14 12:37:08 -03:00
<Window xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2024-04-29 05:56:48 -03:00
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
2024-04-29 06:32:37 -03:00
xmlns:md="clr-namespace:Markdown.Xaml;assembly=Markdown.Xaml"
2024-11-14 12:37:08 -03:00
xmlns:av="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="av"
x:Class="GTPCorrgir.Chat" Title="Chat with OpenAI" Height="300" Width="300" ResizeMode="CanResizeWithGrip"
WindowStyle="None" Background="Transparent" AllowsTransparency="True" MouseEnter="Window_MouseEnter"
MouseLeave="Window_MouseLeave" KeyDown="Window_KeyDown" Opacity="0.8" av:DesignHeight="320.439"
av:DesignWidth="609.769">
2024-04-29 06:32:37 -03:00
<Window.Resources>
<md:Markdown x:Key="MarkdownConverter" />
</Window.Resources>
2024-04-29 05:56:48 -03:00
<Grid>
<Grid.RowDefinitions>
2024-11-14 12:37:08 -03:00
<RowDefinition Height="Auto" />
<RowDefinition Height="2*" />
<RowDefinition Height="*" />
2024-04-29 05:56:48 -03:00
</Grid.RowDefinitions>
2024-11-14 12:37:08 -03:00
<!-- Barra superior con controles -->
2024-04-29 05:56:48 -03:00
<Grid>
<Grid.ColumnDefinitions>
2024-11-14 12:37:08 -03:00
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
2024-04-29 05:56:48 -03:00
</Grid.ColumnDefinitions>
<!-- Selector de modelo LLM -->
<ComboBox x:Name="modelSelector" Grid.Column="0" Margin="1" SelectionChanged="CambiarModelo" />
2024-11-14 12:37:08 -03:00
<!-- Botón de configuración -->
<Button x:Name="settingsButton" Grid.Column="1" Content="⚙" Width="20" Height="20" Margin="5,0"
Click="SettingsButton_Click" ToolTip="Configuración" />
2024-04-29 05:56:48 -03:00
<!-- Área para mover la ventana -->
2024-11-14 12:37:08 -03:00
<Border Background="#444" Height="20" Width="20" Grid.Column="2" Margin="5,0,10,0"
MouseLeftButtonDown="Border_MouseLeftButtonDown" Cursor="SizeAll" ToolTip="Mover ventana">
<TextBlock Text="&#x2630;" HorizontalAlignment="Center" VerticalAlignment="Center" Foreground="White" />
2024-04-29 05:56:48 -03:00
</Border>
</Grid>
<!-- Área de Respuesta -->
2024-04-29 06:32:37 -03:00
<Grid Grid.Row="1" Margin="1">
2024-11-14 12:37:08 -03:00
<RichTextBox Name="responseArea" IsReadOnly="True">
2024-04-29 06:32:37 -03:00
<RichTextBox.Resources>
<md:Markdown x:Key="Markdown" />
</RichTextBox.Resources>
</RichTextBox>
2024-11-14 12:37:08 -03:00
<Button x:Name="clearButton" Content="Limpiar" Width="40" Height="24" HorizontalAlignment="Right"
VerticalAlignment="Bottom" Margin="0" Click="clearButton_Click" />
2024-04-29 06:32:37 -03:00
</Grid>
2024-04-29 05:56:48 -03:00
2024-11-14 12:37:08 -03:00
<!-- Área de Pregunta con Botón -->
2024-04-29 05:56:48 -03:00
<Grid Grid.Row="2" Margin="1">
2024-11-14 12:37:08 -03:00
<TextBox x:Name="questionArea" Padding="10" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap"
Background="White" PreviewKeyDown="QuestionArea_PreviewKeyDown" />
<Button x:Name="sendButton" Content="Enviar" Width="40" Height="24" HorizontalAlignment="Right"
VerticalAlignment="Bottom" Margin="0" Click="SendButton_Click" />
2024-04-29 05:56:48 -03:00
</Grid>
</Grid>
2024-11-14 12:37:08 -03:00
</Window>