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:
@@ -161,6 +161,11 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
var latestRun = await new TaskRunRepository(ctx).GetLatestByTaskIdAsync(taskId);
|
||||
monitor.ApplyOutcome(entity.Result, latestRun?.ErrorMarkdown);
|
||||
await monitor.ReplayLogFileAsync(entity.LogPath, CancellationToken.None);
|
||||
|
||||
// Re-attach: if the task is blocked on an AskUser question right now, surface it.
|
||||
var pending = await _worker.GetPendingQuestionAsync(taskId);
|
||||
if (pending is not null && monitor.SubscribedTaskId == taskId)
|
||||
monitor.SetPendingQuestion(pending.QuestionId, pending.Question);
|
||||
}
|
||||
catch { /* best-effort hydrate */ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user