feat(ui): answer a running task's question inline in Mission Control
TaskMonitorViewModel surfaces a pending AskUser question (TaskQuestionAsked / TaskQuestionResolved events) with an AnswerDraft + SubmitAnswerCommand that calls the new IWorkerClient.AnswerTaskQuestionAsync; MonitorPaneView shows an accent question banner with an input box above the terminal. Pending question is cleared on answer/resolve/finish and re-hydrated on attach via GetPendingQuestionAsync. en/de localization for missionControl.question.*; test fakes updated.
This commit is contained in:
@@ -73,6 +73,34 @@
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Question prompt (AskUser): answer a running task's question inline -->
|
||||
<Border DockPanel.Dock="Top"
|
||||
IsVisible="{Binding HasPendingQuestion}"
|
||||
Background="{DynamicResource AccentSoftBrush}"
|
||||
BorderBrush="{DynamicResource AccentBrush}"
|
||||
BorderThickness="0,0,0,1" Padding="12,8">
|
||||
<StackPanel Spacing="6">
|
||||
<TextBlock Classes="meta"
|
||||
Text="{loc:Tr missionControl.question.title}"
|
||||
Foreground="{DynamicResource AccentBrush}" FontWeight="SemiBold" />
|
||||
<TextBlock Text="{Binding PendingQuestion}" TextWrapping="Wrap"
|
||||
Foreground="{DynamicResource TextBrush}" />
|
||||
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="6">
|
||||
<TextBox Grid.Column="0"
|
||||
Text="{Binding AnswerDraft, UpdateSourceTrigger=PropertyChanged}"
|
||||
PlaceholderText="{loc:Tr missionControl.question.placeholder}"
|
||||
AcceptsReturn="False">
|
||||
<TextBox.KeyBindings>
|
||||
<KeyBinding Gesture="Enter" Command="{Binding SubmitAnswerCommand}" />
|
||||
</TextBox.KeyBindings>
|
||||
</TextBox>
|
||||
<Button Grid.Column="1"
|
||||
Content="{loc:Tr missionControl.question.send}"
|
||||
Command="{Binding SubmitAnswerCommand}" />
|
||||
</Grid>
|
||||
</StackPanel>
|
||||
</Border>
|
||||
|
||||
<!-- Console body: reuse SessionTerminalView -->
|
||||
<islands:SessionTerminalView
|
||||
Entries="{Binding Log}"
|
||||
|
||||
Reference in New Issue
Block a user