Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 25 additions & 23 deletions Legba.WPF/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@
<TabItem Header="Chat">
<Grid Margin="5,5,5,5">
<Grid.RowDefinitions>
<RowDefinition Height="5*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="5"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
Expand Down Expand Up @@ -142,8 +148,26 @@
</ListBox.ItemTemplate>
</ListBox>

<!-- Prompt -->
<Label Grid.Row="2" Grid.Column="0"
Style="{StaticResource LiteralLabel}"
Content="Prompt"/>
<TextBox Grid.Row="3" Grid.Column="0"
x:Name="prompt"
Style="{StaticResource PromptInputTextBox}"
Text="{Binding ChatSession.Prompt, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

<!-- Submit prompt to LLM -->
<Button Grid.Row="5" Grid.Column="1"
Grid.ColumnSpan="3"
Content="Ask"
Width="75"
HorizontalAlignment="Right"
IsEnabled="{Binding ElementName=prompt, Path=Text, Converter={StaticResource StringNotEmptyToBooleanConverter}}"
Command="{Binding AskCommand, AsyncState=True}"/>

<!-- Latest request's token counts -->
<StackPanel Grid.Row="1" Grid.Column="0"
<StackPanel Grid.Row="7" Grid.Column="0"
Orientation="Horizontal">
<Label Content="Session Totals"
FontWeight="Bold"/>
Expand Down Expand Up @@ -215,10 +239,6 @@
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
<RowDefinition Height="Auto" />
<RowDefinition Height="*"/>
<RowDefinition Height="10" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
Expand Down Expand Up @@ -363,24 +383,6 @@
Style="{StaticResource PromptInputTextBox}"
Text="{Binding ChatSession.Process.Text, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

<!-- Prompt -->
<Label Grid.Row="8" Grid.Column="0"
Style="{StaticResource LiteralLabel}"
Content="Prompt"/>
<TextBox Grid.Row="9" Grid.Column="0"
x:Name="prompt"
Grid.ColumnSpan="4"
Style="{StaticResource PromptInputTextBox}"
Text="{Binding ChatSession.Prompt, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

<!-- Submit prompt to LLM -->
<Button Grid.Row="11" Grid.Column="1"
Grid.ColumnSpan="3"
Content="Ask"
Width="75"
HorizontalAlignment="Right"
IsEnabled="{Binding ElementName=prompt, Path=Text, Converter={StaticResource StringNotEmptyToBooleanConverter}}"
Command="{Binding AskCommand, AsyncState=True}"/>
</Grid>

</Grid>
Expand Down
Loading