Forge
4405de34
1<UserControl xmlns="https://github.com/avaloniaui"
2 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3 xmlns:vm="using:CascadeIDE.ViewModels"
4 xmlns:ids="using:CascadeIDE.IdeDisplay.CockpitCommandLine"
5 x:Class="CascadeIDE.Views.CockpitCommandLineOverlayView"
6 x:DataType="vm:CockpitCommandLineOverlayViewModel"
7 Focusable="True"
8 IsVisible="False">
9 <UserControl.Styles>
10 <Style Selector="TextBox.ccl-query">
11 <Setter Property="FontSize" Value="14"/>
12 <Setter Property="Padding" Value="10,8"/>
13 <Setter Property="FontFamily" Value="Consolas,Cascadia Mono,Courier New,monospace"/>
14 <Setter Property="Background" Value="{DynamicResource CascadeTheme.CommandPaletteQueryBackground}"/>
15 <Setter Property="Foreground" Value="{DynamicResource CascadeTheme.CommandPaletteQueryForeground}"/>
16 <Setter Property="CaretBrush" Value="{DynamicResource CascadeTheme.CommandPaletteQueryCaretBrush}"/>
17 <Setter Property="BorderBrush" Value="{DynamicResource CascadeTheme.PanelTitleAccentBrush}"/>
18 <Setter Property="BorderThickness" Value="1"/>
19 <Setter Property="CornerRadius" Value="6"/>
20 </Style>
21 <Style Selector="TextBox.ccl-query /template/ TextBlock#PART_Watermark">
22 <Setter Property="Foreground" Value="{DynamicResource CascadeTheme.CommandPaletteQueryPlaceholderForeground}"/>
23 </Style>
24 <Style Selector="ListBoxItem">
25 <Setter Property="Padding" Value="8,5"/>
26 <Setter Property="Margin" Value="0,1"/>
27 <Setter Property="Background" Value="Transparent"/>
28 <Setter Property="CornerRadius" Value="6"/>
29 </Style>
30 <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
31 <Setter Property="Background" Value="{DynamicResource CascadeTheme.CommandPaletteItemHoverBackground}"/>
32 </Style>
33 <Style Selector="ListBoxItem:selected /template/ ContentPresenter">
34 <Setter Property="Background" Value="{DynamicResource CascadeTheme.CommandPaletteItemSelectedBackground}"/>
35 </Style>
36 </UserControl.Styles>
37 <Border Background="{DynamicResource CascadeTheme.CommandPaletteDimmerOverlay}"
38 PointerPressed="OnDimmerPressed">
39 <Border MaxWidth="860"
40 MaxHeight="620"
41 Margin="40"
42 Padding="16"
43 HorizontalAlignment="Center"
44 VerticalAlignment="Center"
45 Background="{DynamicResource CascadeTheme.CommandPaletteSurfaceBackground}"
46 BorderBrush="{DynamicResource CascadeTheme.CommandPaletteSurfaceBorderBrush}"
47 BorderThickness="1"
48 CornerRadius="6"
49 PointerPressed="OnPanelPressed">
50 <Grid RowDefinitions="Auto,Auto,Auto,*,Auto,Auto">
51 <TextBlock Grid.Row="0"
52 Margin="0,0,0,8"
53 FontSize="12"
54 Opacity="0.9"
55 Foreground="{DynamicResource CascadeTheme.CommandPaletteMetaForeground}"
56 Text="Cockpit Command Line"/>
57 <TextBlock Grid.Row="1"
58 Margin="0,0,0,6"
59 FontSize="11.5"
60 Opacity="0.85"
61 Foreground="{DynamicResource CascadeTheme.CommandPaletteMetaForeground}"
62 IsVisible="{Binding CockpitCommandLineSurfaceSnapshot.Breadcrumb, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
63 Text="{Binding CockpitCommandLineSurfaceSnapshot.Breadcrumb}"/>
64 <TextBox x:Name="CommandLineTextBox"
65 Classes="ccl-query"
66 Grid.Row="2"
67 PlaceholderText="/"
68 Text="{Binding ChatPanel.CockpitCommandLineText, Mode=TwoWay}"/>
69 <ListBox x:Name="SuggestionsListBox"
70 Grid.Row="3"
71 Margin="0,8,0,0"
72 MaxHeight="280"
73 IsVisible="{Binding CockpitCommandLineSurfaceSnapshot.ShowSuggestions}"
74 ItemsSource="{Binding CockpitCommandLineSurfaceSnapshot.Suggestions}"
75 SelectedIndex="{Binding ChatPanel.SelectedChatSlashSuggestionIndex, Mode=TwoWay}"
76 Background="Transparent">
77 <ListBox.ItemTemplate>
78 <DataTemplate DataType="ids:CockpitCommandLineSurfaceEntry">
79 <StackPanel Orientation="Vertical" Spacing="2">
80 <TextBlock Text="{Binding Title}"
81 FontWeight="SemiBold"
82 FontSize="13"
83 Foreground="{DynamicResource CascadeTheme.CommandPaletteTitleForeground}"/>
84 <TextBlock Text="{Binding Subtitle}"
85 FontSize="12"
86 FontFamily="Consolas,Cascadia Mono,Courier New,monospace"
87 TextWrapping="Wrap"
88 Opacity="0.95"
89 Foreground="{DynamicResource CascadeTheme.CommandPaletteMetaForeground}"/>
90 </StackPanel>
91 </DataTemplate>
92 </ListBox.ItemTemplate>
93 </ListBox>
94 <TextBlock Grid.Row="4"
95 Margin="0,10,0,0"
96 FontSize="12.5"
97 FontFamily="Consolas,Cascadia Mono,Courier New,monospace"
98 TextWrapping="Wrap"
99 Opacity="0.95"
100 Foreground="{DynamicResource CascadeTheme.CommandPaletteMetaForeground}"
101 Text="{Binding ChatPanel.CommandLineSlashPreview}"/>
102 <TextBlock Grid.Row="5"
103 Margin="0,10,0,0"
104 FontSize="12"
105 Opacity="0.92"
106 Foreground="{DynamicResource CascadeTheme.CommandPaletteMetaForeground}"
107 Text="Tab — подсказка · ↑↓ — выбор · Enter — выполнить · Esc — закрыть"/>
108 </Grid>
109 </Border>
110 </Border>
111</UserControl>
112
View only · write via MCP/CIDE