Files
ClaudeDo/src/ClaudeDo.Ui/Services/IDialogService.cs
T
mika kuns 8103006e26 feat(ui): add usage monitor modal with gauges and model/task usage analysis
Adds a Usage Monitor modal (Worker menu + wired to the footer/Mission-Control
usage pill's Open command): dynamic gauges built from UsageSnapshotDto.Limits
with gate-threshold marks, a stale/blocked-gate band, and Models/Tasks tabs
backed by GetModelUsageAsync/GetTaskUsageAsync over a 7d/30d/custom range.
2026-08-05 13:57:21 +02:00

40 lines
1.9 KiB
C#

using System.Threading.Tasks;
using ClaudeDo.Ui.ViewModels;
using ClaudeDo.Ui.ViewModels.Conflicts;
using ClaudeDo.Ui.ViewModels.Modals;
namespace ClaudeDo.Ui.Services;
/// <summary>
/// Single seam for opening modal dialogs. Replaces the per-modal <c>Show*Modal</c>
/// Func callbacks that were previously wired separately on the shell and the lists
/// island (and the Confirm/Error dialogs duplicated in both code-behinds). The view
/// layer supplies the implementation (<see cref="ClaudeDo.Ui.Views.WindowDialogService"/>);
/// callers build + initialize the VM and hand it here to be shown.
/// </summary>
public interface IDialogService
{
Task ShowAboutAsync(AboutModalViewModel vm);
Task ShowWeeklyReportAsync(WeeklyReportModalViewModel vm);
Task ShowUsageMonitorAsync(UsageMonitorModalViewModel vm);
Task ShowSettingsAsync(SettingsModalViewModel vm);
Task ShowListSettingsAsync(ListSettingsModalViewModel vm);
Task ShowRepoImportAsync(RepoImportModalViewModel vm);
Task ShowWorktreesOverviewAsync(WorktreesOverviewModalViewModel vm);
/// <summary>Merge-helper task picker. Returns the ordered selected task ids, or null on cancel.</summary>
Task<IReadOnlyList<string>?> ShowMergeHelperSelectionAsync(MergeHelperSelectionModalViewModel vm);
Task ShowWorkerConnectionAsync(WorkerConnectionModalViewModel vm);
Task ShowConflictResolverAsync(ConflictResolverViewModel vm);
Task ShowLogVisualizerAsync(LogVisualizerViewModel vm);
/// <summary>Modal yes/no confirmation. Returns true only when confirmed.</summary>
Task<bool> ConfirmAsync(string message);
/// <summary>Modal error notice with a single dismiss button.</summary>
Task ShowErrorAsync(string message);
/// <summary>Show (or re-show + focus) the modeless Mission Control window. Lazily created; hides on close.</summary>
void ShowMissionControl(MissionControlViewModel vm);
}