| 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:views="using:CascadeIDE.Views" |
| 5 | x:Class="CascadeIDE.Views.TaskCockpitView" |
| 6 | x:DataType="vm:MainWindowViewModel"> |
| 7 | <StackPanel Spacing="0"> |
| 8 | <!-- Блокировка сплиттеров рабочей области (раньше отдельный ToolbarView). Всегда видна, не зависит от ShowTaskBar. --> |
| 9 | <Border Padding="8,4" |
| 10 | Margin="0,0,0,0" |
| 11 | Background="{DynamicResource CascadeTheme.ToolbarBackground}"> |
| 12 | <!-- *,Auto,* — центральный блок CMD+мелодия как HDG Select по центру полосы; слева только замок. --> |
| 13 | <Grid ColumnDefinitions="*,Auto,*" VerticalAlignment="Center"> |
| 14 | <Button Grid.Column="0" |
| 15 | Padding="0" |
| 16 | HorizontalAlignment="Left" |
| 17 | VerticalAlignment="Center" |
| 18 | Background="Transparent" |
| 19 | BorderThickness="0" |
| 20 | Command="{Binding ToggleWorkspaceSplittersLockCommand}" |
| 21 | ToolTip.Tip="{Binding WorkspaceSplitterLockButtonToolTip}"> |
| 22 | <views:WorkspaceSplittersTolStripLampCell SplittersLocked="{Binding WorkspaceSplittersLocked}"/> |
| 23 | </Button> |
| 24 | <StackPanel Grid.Column="1" |
| 25 | Orientation="Horizontal" |
| 26 | Spacing="8" |
| 27 | VerticalAlignment="Center"> |
| 28 | <!-- ADR 0060/0064: лампа CascadeChord — PrimitivesKit + Views; не дублировать палитру в AXAML (0066). --> |
| 29 | <views:CommandArmedStripLampCell IsArmed="{Binding IsCascadeChordOverlayVisible}" |
| 30 | ToolTip.Tip="{Binding CommandArmedLampToolTip}" |
| 31 | VerticalAlignment="Center"/> |
| 32 | <!-- ADR 0060: поле + выпадающий список по префиксу. --> |
| 33 | <views:CascadeChordHudStripView VerticalAlignment="Center"/> |
| 34 | </StackPanel> |
| 35 | </Grid> |
| 36 | </Border> |
| 37 | <Border Margin="8,0,8,4" |
| 38 | Padding="8,6" |
| 39 | IsVisible="{Binding ShowTaskBar}" |
| 40 | Classes="modeCard"> |
| 41 | <StackPanel Spacing="6"> |
| 42 | <WrapPanel Orientation="Horizontal" ItemHeight="28"> |
| 43 | <TextBlock Text="{Binding ActiveTaskTitle}" FontWeight="SemiBold" Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}" Margin="0,0,8,0"/> |
| 44 | <Border Classes="modeCard" Padding="6,2" Margin="0,0,8,0"> |
| 45 | <TextBlock Text="{Binding ActiveTaskStatus}" Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}"/> |
| 46 | </Border> |
| 47 | <TextBlock Text="{Binding ActiveTaskProgress, StringFormat='{}Progress: {0}%'}" |
| 48 | IsVisible="{Binding IsActiveTaskProgressVisible}" |
| 49 | Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}" |
| 50 | Margin="0,0,8,0"/> |
| 51 | </WrapPanel> |
| 52 | |
| 53 | <Border Classes="modeCard" IsVisible="{Binding ShowTelemetryHiddenHint}"> |
| 54 | <StackPanel Orientation="Horizontal" Spacing="8"> |
| 55 | <TextBlock Text="Панель телеметрии скрыта. Откройте её, чтобы видеть ход сборки и события." |
| 56 | Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}" |
| 57 | VerticalAlignment="Center"/> |
| 58 | <Button Content="Показать" Command="{Binding ToggleTerminalCommand}"/> |
| 59 | </StackPanel> |
| 60 | </Border> |
| 61 | |
| 62 | <Border Classes="modeCard" |
| 63 | IsVisible="{Binding UiModeFamily, Converter={StaticResource UiModeFamilyEq}, ConverterParameter=Power}" |
| 64 | Padding="8" |
| 65 | Margin="0,0,0,6"> |
| 66 | <StackPanel Spacing="8"> |
| 67 | <TextBlock Text="Autonomous run (Power)" |
| 68 | FontWeight="SemiBold" |
| 69 | Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}"/> |
| 70 | <Grid ColumnDefinitions="*,Auto,Auto,Auto,Auto,Auto" |
| 71 | ColumnSpacing="8"> |
| 72 | <TextBox Grid.Column="0" |
| 73 | Text="{Binding Autonomous.AutonomousObjective, Mode=TwoWay}" |
| 74 | PlaceholderText="Autonomous objective" |
| 75 | FontFamily="Consolas,monospace" |
| 76 | FontSize="11"/> |
| 77 | <TextBlock Grid.Column="1" |
| 78 | Text="Max steps:" |
| 79 | Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}" |
| 80 | VerticalAlignment="Center"/> |
| 81 | <TextBox Grid.Column="2" |
| 82 | Text="{Binding Autonomous.AutonomousMaxSteps, Mode=TwoWay}" |
| 83 | Width="56" |
| 84 | TextAlignment="Center" |
| 85 | FontFamily="Consolas,monospace" |
| 86 | FontSize="11"/> |
| 87 | <Button Grid.Column="3" |
| 88 | Content="Start" |
| 89 | Command="{Binding Autonomous.StartAutonomousCommand}" |
| 90 | IsVisible="{Binding !Autonomous.IsAutonomousPaused}"/> |
| 91 | <Button Grid.Column="4" |
| 92 | Content="Pause" |
| 93 | Command="{Binding Autonomous.PauseAutonomousCommand}" |
| 94 | IsVisible="{Binding Autonomous.IsAutonomousRunning}"/> |
| 95 | <Button Grid.Column="4" |
| 96 | Content="Resume" |
| 97 | Command="{Binding Autonomous.ResumeAutonomousCommand}" |
| 98 | IsVisible="{Binding Autonomous.IsAutonomousPaused}"/> |
| 99 | <Button Grid.Column="5" |
| 100 | Content="Details…" |
| 101 | VerticalAlignment="Center" |
| 102 | ToolTip.Tip="Редактировать полную формулировку цели (popover)"> |
| 103 | <Button.Flyout> |
| 104 | <Flyout Placement="BottomEdgeAlignedLeft"> |
| 105 | <Border Classes="modeCard" |
| 106 | Padding="10" |
| 107 | MinWidth="360" |
| 108 | MaxWidth="520"> |
| 109 | <StackPanel Spacing="8"> |
| 110 | <TextBlock Text="Autonomous objective (full)" |
| 111 | FontWeight="SemiBold" |
| 112 | Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}"/> |
| 113 | <TextBox Text="{Binding Autonomous.AutonomousObjective, Mode=TwoWay}" |
| 114 | AcceptsReturn="True" |
| 115 | TextWrapping="Wrap" |
| 116 | MinHeight="120" |
| 117 | FontFamily="Consolas,monospace" |
| 118 | FontSize="11"/> |
| 119 | <TextBlock Text="Та же строка, что в компактном поле выше; закрой popover кликом снаружи или Esc." |
| 120 | TextWrapping="Wrap" |
| 121 | FontSize="11" |
| 122 | Foreground="{DynamicResource CascadeTheme.ChatLabelForeground}"/> |
| 123 | </StackPanel> |
| 124 | </Border> |
| 125 | </Flyout> |
| 126 | </Button.Flyout> |
| 127 | </Button> |
| 128 | </Grid> |
| 129 | </StackPanel> |
| 130 | </Border> |
| 131 | |
| 132 | <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled" IsVisible="{Binding UiModeFamily, Converter={StaticResource UiModeFamilyNe}, ConverterParameter=Focus}"> |
| 133 | <WrapPanel Orientation="Horizontal" ItemHeight="30"> |
| 134 | <Button Content="Fix failing tests" Command="{Binding Autonomous.FixFailingTestsCommand}" IsVisible="{Binding QuickActions}" Margin="0,0,6,0"/> |
| 135 | <Button Content="Investigate nullref" Command="{Binding Autonomous.InvestigateNullrefCommand}" IsVisible="{Binding QuickActions}" Margin="0,0,6,0"/> |
| 136 | <Button Content="Prepare commit" Command="{Binding Autonomous.PrepareCommitCommand}" IsVisible="{Binding QuickActions}" Margin="0,0,6,0"/> |
| 137 | <Border Classes="modeCard" Padding="6,2" Margin="0,0,6,0" IsVisible="{Binding IsLocBadgeVisible}" |
| 138 | ToolTip.Tip="LOC: непустые строки файла на диске (как get_code_metrics), ось Low/Medium/High по [loc_limits] в workspace.toml. Несохранённый буфер не учитывается."> |
| 139 | <TextBlock Text="{Binding LocBadgeSummary}" Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}"/> |
| 140 | </Border> |
| 141 | <Border Classes="modeCard" Padding="6,2" Margin="0,0,6,0" IsVisible="{Binding IsImpactedTestsBadgeVisible}" |
| 142 | ToolTip.Tip="Упавшие тесты в последнем прогоне dotnet test (IDE/MCP)."> |
| 143 | <TextBlock Text="{Binding ImpactedTestsBadge, StringFormat='{}Impacted tests: {0}'}" Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}"/> |
| 144 | </Border> |
| 145 | <Border Classes="modeCard" Padding="6,2" Margin="0,0,6,0" IsVisible="{Binding Chrome.IsFilesChangedBadgeVisible}" |
| 146 | ToolTip.Tip="Число путей в git status --short (изменённые/новые), синхронно со сводкой Git."> |
| 147 | <TextBlock Text="{Binding Chrome.FilesChangedBadge, StringFormat='{}Files changed: {0}'}" Foreground="{DynamicResource CascadeTheme.ToolbarTextForeground}"/> |
| 148 | </Border> |
| 149 | </WrapPanel> |
| 150 | </ScrollViewer> |
| 151 | </StackPanel> |
| 152 | </Border> |
| 153 | </StackPanel> |
| 154 | </UserControl> |
| 155 | |