feat(ui): AskUser question banner in the detail island
The inline answer banner for a running task's AskUser question only existed in Mission Control. Surface the same banner in the detail pane, bound to the detail island's existing TaskMonitorViewModel (shared state — no new state, no duplication) so a question can be answered without opening Mission Control. Mirrors MC: live TaskQuestionAsked events for the selected task.
This commit is contained in:
@@ -80,6 +80,37 @@
|
|||||||
Foreground="{DynamicResource TextDimBrush}"/>
|
Foreground="{DynamicResource TextDimBrush}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
|
<!-- Question prompt (AskUser): answer the running task's question inline, mirroring
|
||||||
|
the Mission Control banner. State is shared via the same TaskMonitorViewModel. -->
|
||||||
|
<Border DockPanel.Dock="Top"
|
||||||
|
IsVisible="{Binding Monitor.HasPendingQuestion}"
|
||||||
|
Margin="0,0,0,10" Padding="12,8"
|
||||||
|
Background="{DynamicResource AccentSoftBrush}"
|
||||||
|
BorderBrush="{DynamicResource AccentBrush}"
|
||||||
|
BorderThickness="1" CornerRadius="10">
|
||||||
|
<StackPanel Spacing="6">
|
||||||
|
<TextBlock Classes="meta"
|
||||||
|
Text="{loc:Tr missionControl.question.title}"
|
||||||
|
Foreground="{DynamicResource AccentBrush}" FontWeight="SemiBold"/>
|
||||||
|
<TextBlock Text="{Binding Monitor.PendingQuestion}" TextWrapping="Wrap"
|
||||||
|
Foreground="{DynamicResource TextBrush}"/>
|
||||||
|
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="6">
|
||||||
|
<TextBox Grid.Column="0"
|
||||||
|
Text="{Binding Monitor.AnswerDraft, UpdateSourceTrigger=PropertyChanged}"
|
||||||
|
PlaceholderText="{loc:Tr missionControl.question.placeholder}"
|
||||||
|
AcceptsReturn="False">
|
||||||
|
<TextBox.KeyBindings>
|
||||||
|
<KeyBinding Gesture="Enter" Command="{Binding Monitor.SubmitAnswerCommand}"/>
|
||||||
|
</TextBox.KeyBindings>
|
||||||
|
</TextBox>
|
||||||
|
<Button Grid.Column="1"
|
||||||
|
Content="{loc:Tr missionControl.question.send}"
|
||||||
|
Command="{Binding Monitor.SubmitAnswerCommand}"/>
|
||||||
|
</Grid>
|
||||||
|
</StackPanel>
|
||||||
|
</Border>
|
||||||
|
|
||||||
<detail:WorkConsole/>
|
<detail:WorkConsole/>
|
||||||
</DockPanel>
|
</DockPanel>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user