feat(ui): reveal a task by id from anywhere
This commit is contained in:
@@ -22,6 +22,17 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
|
||||
[ObservableProperty] private int _columnCount = 1;
|
||||
|
||||
private Action<string>? _openInApp;
|
||||
public Action<string>? OpenInApp
|
||||
{
|
||||
get => _openInApp;
|
||||
set
|
||||
{
|
||||
_openInApp = value;
|
||||
foreach (var m in Monitors) m.OpenInAppRequested = value;
|
||||
}
|
||||
}
|
||||
|
||||
public bool HasMonitors => Monitors.Count > 0;
|
||||
|
||||
public MissionControlViewModel(IDbContextFactory<ClaudeDoDbContext> dbFactory, IWorkerClient worker)
|
||||
@@ -53,6 +64,7 @@ public sealed partial class MissionControlViewModel : ViewModelBase, IDisposable
|
||||
|
||||
var monitor = new TaskMonitorViewModel(_dbFactory, _worker);
|
||||
monitor.SetTaskId(taskId);
|
||||
monitor.OpenInAppRequested = _openInApp;
|
||||
Monitors.Add(monitor);
|
||||
_ = HydrateAsync(monitor, taskId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user