using NozCli.Repl; using Spectre.Console; namespace NozCli.Commands; /// sync = push + rebuild index public class SyncCommand : ICommand { public string Name => "sync"; public string Description => "Push notes and rebuild the server index"; public string Usage => "sync "; private readonly PushCommand _push = new(); public async Task ExecuteAsync(string[] args, ReplContext ctx) { await _push.ExecuteAsync(args, ctx); await AnsiConsole.Status().StartAsync("Triggering index rebuild…", async _ => await ctx.Api.RebuildIndexAsync()); AnsiConsole.MarkupLine("[green]✓ Index rebuild queued[/]"); } }