120 lines
5.3 KiB
XML
120 lines
5.3 KiB
XML
<Window xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:vm="clr-namespace:ClaudeDo.Ui.ViewModels.Modals"
|
|
xmlns:ctl="using:ClaudeDo.Ui.Views.Controls"
|
|
x:Class="ClaudeDo.Ui.Views.Modals.ListSettingsModalView"
|
|
x:DataType="vm:ListSettingsModalViewModel"
|
|
Title="List settings"
|
|
Width="520" Height="720"
|
|
CanResize="True"
|
|
MinWidth="460" MinHeight="520"
|
|
WindowDecorations="None"
|
|
ExtendClientAreaToDecorationsHint="True"
|
|
WindowStartupLocation="CenterOwner"
|
|
Background="{DynamicResource SurfaceBrush}">
|
|
|
|
<Window.KeyBindings>
|
|
<KeyBinding Gesture="Escape" Command="{Binding CancelCommand}"/>
|
|
<KeyBinding Gesture="Enter" Command="{Binding SaveCommand}"/>
|
|
</Window.KeyBindings>
|
|
|
|
<ctl:ModalShell Title="LIST SETTINGS" CloseCommand="{Binding CancelCommand}">
|
|
<ctl:ModalShell.Footer>
|
|
<Grid ColumnDefinitions="Auto,*,Auto" VerticalAlignment="Center" Margin="16,0">
|
|
<Button Grid.Column="0" Content="Delete list" Classes="danger"
|
|
Command="{Binding DeleteCommand}" MinWidth="90"/>
|
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="8">
|
|
<Button Content="Cancel" Command="{Binding CancelCommand}" MinWidth="90"/>
|
|
<Button Content="Save" Classes="primary" Command="{Binding SaveCommand}" MinWidth="90"/>
|
|
</StackPanel>
|
|
</Grid>
|
|
</ctl:ModalShell.Footer>
|
|
|
|
<!-- Body -->
|
|
<ScrollViewer Padding="20,16">
|
|
<StackPanel Spacing="18">
|
|
|
|
<!-- GENERAL -->
|
|
<StackPanel Spacing="0">
|
|
<TextBlock Classes="section-label" Text="GENERAL"/>
|
|
<Border Classes="section">
|
|
<StackPanel Spacing="12">
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="Name"/>
|
|
<TextBox Text="{Binding Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="Working directory"/>
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<TextBox Grid.Column="0" Text="{Binding WorkingDir}" PlaceholderText="(none)" />
|
|
<Button Grid.Column="1" Content="Browse..." Margin="8,0,0,0" Click="BrowseClicked" />
|
|
</Grid>
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="Default commit type"/>
|
|
<ComboBox ItemsSource="{Binding CommitTypeOptions}"
|
|
SelectedItem="{Binding DefaultCommitType, Mode=TwoWay}"
|
|
HorizontalAlignment="Left" MinWidth="160" />
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
<!-- AGENT -->
|
|
<StackPanel Spacing="0">
|
|
<Grid ColumnDefinitions="*,Auto" Margin="4,0,0,6">
|
|
<TextBlock Classes="section-label" Text="AGENT" Margin="0"/>
|
|
<Button Grid.Column="1" Content="Reset agent settings"
|
|
Command="{Binding ResetAgentSettingsCommand}" />
|
|
</Grid>
|
|
<Border Classes="section">
|
|
<StackPanel Spacing="12">
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="Model"/>
|
|
<ComboBox ItemsSource="{Binding ModelOptions}"
|
|
SelectedItem="{Binding SelectedModel, Mode=TwoWay}"
|
|
HorizontalAlignment="Left" MinWidth="160" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="System prompt (appended)"/>
|
|
<TextBox Text="{Binding SystemPrompt, Mode=TwoWay}"
|
|
AcceptsReturn="True" TextWrapping="Wrap"
|
|
MinHeight="80" />
|
|
</StackPanel>
|
|
|
|
<StackPanel Spacing="4">
|
|
<TextBlock Classes="field-label" Text="Agent file"/>
|
|
<Grid ColumnDefinitions="*,Auto">
|
|
<ComboBox Grid.Column="0"
|
|
ItemsSource="{Binding Agents}"
|
|
SelectedItem="{Binding SelectedAgent, Mode=TwoWay}"
|
|
HorizontalAlignment="Stretch">
|
|
<ComboBox.ItemTemplate>
|
|
<DataTemplate>
|
|
<StackPanel>
|
|
<TextBlock Classes="title" Text="{Binding Name}"/>
|
|
<TextBlock Classes="meta" Text="{Binding Description}"/>
|
|
</StackPanel>
|
|
</DataTemplate>
|
|
</ComboBox.ItemTemplate>
|
|
</ComboBox>
|
|
<Button Grid.Column="1" Content="Browse..."
|
|
Margin="8,0,0,0" Click="BrowseAgentClicked" />
|
|
</Grid>
|
|
<TextBlock Classes="path-mono" Text="{Binding SelectedAgent.Path}"
|
|
TextTrimming="PrefixCharacterEllipsis"
|
|
IsVisible="{Binding SelectedAgent.Path, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
|
|
</StackPanel>
|
|
</StackPanel>
|
|
</Border>
|
|
</StackPanel>
|
|
|
|
</StackPanel>
|
|
</ScrollViewer>
|
|
|
|
</ctl:ModalShell>
|
|
</Window>
|