Commands\AddCommand.cs (14)
116InteractionService.DisplayError(AddCommandStrings.SourceWithCredentialsNotSupported);
149if (!await SdkInstallHelper.EnsureSdkInstalledAsync(_sdkInstaller, InteractionService, Telemetry, cancellationToken: cancellationToken))
198var (discoveredPackages, discoveredPolyglotIds) = await InteractionService.ShowStatusAsync(
210var discoveredPackages = await InteractionService.ShowStatusAsync(
269InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PolyglotIntegrationsHidden, hiddenIntegrationCount));
374InteractionService.DisplayMessage(KnownEmojis.Package, Aspire.Cli.Resources.TemplatingStrings.NuGetConfigCreatedOrUpdatedConfirmationMessage);
409InteractionService.DisplayMessage(KnownEmojis.Information, AddCommandStrings.StoppedRunningInstance);
419success = await InteractionService.ShowStatusAsync(
434InteractionService.DisplayLines(outputCollector.GetLines());
439InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PackageAddedSuccessfully, selectedNuGetPackage.Package.Id, selectedNuGetPackage.Package.Version));
446return HandleProjectLocatorException(ex, InteractionService, Telemetry);
463InteractionService.DisplayLines(outputCollector.GetLines());
607var allVersions = await InteractionService.ShowStatusAsync(
696InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoPackagesMatchedSearchTerm, searchTerm));
Commands\BaseCommand.cs (10)
71InteractionService.DisplayCancellationMessage(CancellationMessage, consoleOverride);
87InteractionService.Console = ConsoleOutput.Error;
96await FlushExtensionInteractionServiceAsync(InteractionService).ConfigureAwait(false);
128InteractionService.DisplayError(miscasedOptionError);
207&& ExtensionHelper.IsExtensionHost(InteractionService, out var extensionInteractionService, out _)
216InteractionService.DisplayError(result.ErrorMessage);
235InteractionService.DisplayMessage(
237string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.SeeLogsAt, MarkupHelpers.SafeFileLink(InteractionService, _executionContext.LogFilePath)),
245InteractionService.DisplayMessage(
247string.Format(CultureInfo.CurrentCulture, InteractionServiceStrings.SeeAppHostLogsAt, MarkupHelpers.SafeFileLink(InteractionService, ExecutionContext.AppHostCliLogFilePath)),
Commands\ConfigCommand.cs (44)
49var subcommand = await InteractionService.PromptForSelectionAsync(
88var key = await InteractionService.PromptForStringAsync(ConfigCommandStrings.GetCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
98InteractionService.DisplayPlainText(value);
103InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
153var key = await InteractionService.PromptForStringAsync(ConfigCommandStrings.SetCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
154var value = await InteractionService.PromptForStringAsync(ConfigCommandStrings.SetCommand_PromptForValue, required: true, cancellationToken: cancellationToken);
155var isGlobal = await InteractionService.PromptForSelectionAsync(
170InteractionService.DisplayError(feature.Description);
175InteractionService.DisplayError(ErrorStrings.LegacyAppHostPathCannotBeSetWithConfigCommand);
181InteractionService.DisplayError(ErrorStrings.GlobalAppHostPathCannotBeSetWithConfigCommand);
188InteractionService.DisplaySuccess(isGlobal
200InteractionService.DisplayError(errorMessage);
232if (InteractionService is ExtensionInteractionService extensionInteractionService)
250InteractionService.DisplayMessage(KnownEmojis.Information, ConfigCommandStrings.NoConfigurationValuesFound);
255InteractionService.DisplayMarkupLine($" [dim]{ConfigCommandStrings.ListCommand_AllFeaturesHint.EscapeMarkup()}[/]");
275InteractionService.DisplayEmptyLine();
299InteractionService.DisplayEmptyLine();
300InteractionService.DisplayMarkdown($"**{ConfigCommandStrings.AvailableFeaturesHeader}:**");
307InteractionService.DisplayMarkupLine($" [cyan]{feature.Name.EscapeMarkup()}[/] [dim](default: {defaultText})[/]");
308InteractionService.DisplayMarkupLine($" [dim]{feature.Description.EscapeMarkup()}[/]");
310InteractionService.DisplayEmptyLine();
311InteractionService.DisplayMarkupLine($" [dim]{ConfigCommandStrings.SetFeatureHint.EscapeMarkup()}[/]");
315InteractionService.DisplayMarkupLine($" [dim]{ConfigCommandStrings.ListCommand_AllFeaturesHint.EscapeMarkup()}[/]");
354InteractionService.DisplayRenderable(table);
391var key = await InteractionService.PromptForStringAsync(ConfigCommandStrings.DeleteCommand_PromptForKey, required: true, cancellationToken: cancellationToken);
396InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
400var isGlobal = await InteractionService.PromptForSelectionAsync(
419InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedGlobally, key));
423InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, ConfigCommandStrings.ConfigurationKeyDeletedLocally, key));
430InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ErrorStrings.ConfigurationKeyNotFound, key));
438InteractionService.DisplayError(errorMessage);
487if (InteractionService is ConsoleInteractionService consoleService)
494InteractionService.DisplayPlainText(json);
499InteractionService.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_LocalSettingsPath}:**");
500InteractionService.DisplayPlainText($" {localPath}");
501InteractionService.DisplayEmptyLine();
502InteractionService.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_GlobalSettingsPath}:**");
503InteractionService.DisplayPlainText($" {globalPath}");
504InteractionService.DisplayEmptyLine();
505InteractionService.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_AvailableFeatures}:**");
508InteractionService.DisplayMarkupLine($" [cyan]{feature.Name.EscapeMarkup()}[/] - {feature.Description.EscapeMarkup()} [dim](default: {feature.DefaultValue})[/]");
510InteractionService.DisplayEmptyLine();
511InteractionService.DisplayMarkdown($"**{ConfigCommandStrings.InfoCommand_SettingsProperties}:**");
515InteractionService.DisplayMarkupLine($" {requiredText}[cyan]{property.Name.EscapeMarkup()}[/] ([yellow]{property.Type.EscapeMarkup()}[/]) - {property.Description.EscapeMarkup()}");
Commands\DescribeCommand.cs (11)
153return CommandResult.FromExitCode(AppHostConnectionResultHandler.DisplayFailureAsInformation(result, InteractionService));
198AppHostFollowDisconnectHelpers.WriteStatusMessage(InteractionService, connection);
222InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, DescribeCommandStrings.ResourceNotFound, resourceName));
238InteractionService.DisplayRawText(diagram, ConsoleOutput.Standard);
246InteractionService.DisplayRawText(json, ConsoleOutput.Standard);
298InteractionService.DisplayRawText(json, ConsoleOutput.Standard);
360InteractionService.DisplayMessage(KnownEmojis.Information, "No resources found.");
391nameMarkup = MarkupHelpers.SafeLink(InteractionService, resourceUrl, displayName);
401InteractionService.DisplayRenderable(table);
423InteractionService.DisplayMarkupLine($"{ColorResourceName(state.DisplayName, $"[[{state.DisplayName.EscapeMarkup()}]]")} {stateText}{healthText}{endpointsStr}");
456? MarkupHelpers.SafeLink(InteractionService, url, text)
Commands\ExportCommand.cs (10)
104_connectionResolver, InteractionService, _httpClientFactory, _logger, passedAppHostProjectFile, dashboardUrl, apiKey, requireDashboard: false, cancellationToken);
113InteractionService.DisplayMessage(KnownEmojis.Warning, ExportCommandStrings.DashboardNotAvailable);
124TelemetryCommandHelpers.DisplayTelemetryError(InteractionService, errorInfo);
150var (telemetryResources, allSnapshots) = await InteractionService.ShowStatusAsync(ExportCommandStrings.GatheringResources, async () =>
169InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, ExportCommandStrings.ResourceNotFound, resourceName));
175InteractionService.DisplayMessage(KnownEmojis.Information, ExportCommandStrings.NoResourcesFound);
200await InteractionService.ShowStatusAsync(ExportCommandStrings.GatheringConsoleLogs, async () =>
210await InteractionService.ShowStatusAsync(ExportCommandStrings.GatheringStructuredLogs, async () =>
217await InteractionService.ShowStatusAsync(ExportCommandStrings.GatheringTraces, async () =>
227InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, ExportCommandStrings.ExportComplete, fullPath));
Commands\InitCommand.cs (26)
181InteractionService,
197InteractionService.DisplayEmptyLine();
198InteractionService.DisplayMessage(
203InteractionService.DisplayEmptyLine();
207InteractionService.DisplaySubtleMessage($" {command}");
226InteractionService.DisplayMessage(
279InteractionService.DisplayMessage(KnownEmojis.Package, TemplatingStrings.NuGetConfigCreatedOrUpdatedConfirmationMessage);
285InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FileAlreadyExistsSkipping, "apphost.cs"));
302InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.CreatedFile, "apphost.cs"));
373InteractionService.DisplayMessage(KnownEmojis.Package, TemplatingStrings.NuGetConfigCreatedOrUpdatedConfirmationMessage);
378InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FileAlreadyExistsSkipping, $"{appHostDirName}/"));
418InteractionService.DisplayError(ex.Message);
423InteractionService.DisplayError(ex.Message);
432InteractionService.DisplayError(ex.Message);
449InteractionService.DisplayLines(installOutcome.OutputLines);
450InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TemplatingStrings.TemplateInstallationFailed, installOutcome.ExitCode));
456var result = await InteractionService.ShowStatusAsync(
471InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FailedToCreateAppHostFromTemplate, result));
475InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.CreatedFile, $"{appHostDirName}/"));
490InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FileAlreadyExistsSkipping, existingAppHostFileName));
498InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FileAlreadyExistsSkipping, displayPath));
527InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.CreatedFile, displayPath));
553InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FailedToParseExistingConfig, AspireConfigFile.FileName, configPath, ex.Message));
554InteractionService.DisplayMessage(KnownEmojis.Warning, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.FixOrRemoveConfigAndRerun, AspireConfigFile.FileName));
648InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.CreatedFile, AspireConfigFile.FileName));
842InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, string.Format(CultureInfo.CurrentCulture, InitCommandStrings.CreatedFile, fileName));
Commands\IntegrationSearchCommand.cs (11)
86var (discoveredPackages, discoveredPolyglotIds) = await InteractionService.ShowStatusAsync(
94packagesWithChannels = (await InteractionService.ShowStatusAsync(
129InteractionService.DisplaySubtleMessage(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.PolyglotIntegrationsHidden, hiddenIntegrationCount));
137return HandleProjectLocatorException(ex, InteractionService, Telemetry);
178InteractionService.DisplayRawText(json, ConsoleOutput.Standard);
189InteractionService.DisplayError(AddCommandStrings.NoPolyglotCompatibleIntegrationsFound);
193InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.NoIntegrationPackagesMatchedSearchTerm, searchTerm));
197InteractionService.DisplayError(AddCommandStrings.NoPackagesFound);
205InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.FoundIntegrationPackagesMatchingSearchTerm, results.Length, searchTerm));
209InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, AddCommandStrings.FoundIntegrationPackages, results.Length));
225InteractionService.DisplayRenderable(table);
Commands\PipelineCommandBase.cs (31)
170if (ExtensionHelper.IsExtensionHost(InteractionService, out var extensionInteractionService, out _)
212var startDebugSession = ExtensionHelper.IsExtensionHost(InteractionService, out _, out _) && parseResult.GetValue(RootCommand.StartDebugSessionOption);
299InteractionService.DisplayMessage(KnownEmojis.Bug, InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
302var backchannel = await InteractionService.ShowStatusAsync(GetProgressMessage(parseResult), (Func<Task<IAppHostCliBackchannel>>)(async () =>
321&& ExtensionHelper.IsExtensionHost(InteractionService, out _, out _))
353InteractionService.DisplayRawText(json, ConsoleOutput.Standard);
400InteractionService.DisplayLines(outputCollector.GetLines());
434return HandleProjectLocatorException(ex, InteractionService, Telemetry);
461InteractionService.DisplayError(errorMessage);
464InteractionService.DisplayLines(outputCollector.GetLines());
474InteractionService.DisplayError(errorMessage);
477InteractionService.DisplayLines(outputCollector.GetLines());
487InteractionService.DisplayError(errorMessage);
490InteractionService.DisplayLines(outputCollector.GetLines());
783InteractionService.DisplaySubtleMessage($"[[DEBUG]] Step {stepCounter++}: {statusText}", allowMarkup: true);
792InteractionService.DisplaySubtleMessage($"[[DEBUG]] Step {activity.Data.Id}: {status} - {statusText}", allowMarkup: true);
814InteractionService.DisplaySubtleMessage(formattedMessage, allowMarkup: true);
825InteractionService.DisplaySubtleMessage($"[[DEBUG]] Task {activity.Data.Id} ({stepId}): {status} - {statusText}", allowMarkup: true);
829InteractionService.DisplaySubtleMessage($"[[DEBUG]] {completionMessage}", allowMarkup: true);
835InteractionService.DisplaySubtleMessage($"[[DEBUG]] Task {activity.Data.Id} ({stepId}): {statusText}", allowMarkup: true);
847InteractionService.DisplaySubtleMessage($"[[DEBUG]] {OperationCompletedPrefix}: {status} - {statusText}", allowMarkup: true);
1183InteractionService.DisplayError(error);
1189InputType.Text => await InteractionService.PromptForStringAsync(
1195InputType.SecretText => await InteractionService.PromptForStringAsync(
1204InputType.Boolean => (await InteractionService.PromptConfirmAsync(promptText, binding: PromptBinding.CreateDefault(ParseBooleanValue(input.Value)), cancellationToken: cancellationToken)).ToString().ToLowerInvariant(),
1220return await InteractionService.PromptForStringAsync(promptText, binding: PromptBinding.CreateDefault(input.Value), required: input.Required, cancellationToken: cancellationToken);
1234var (value, displayText) = await InteractionService.PromptForSelectionAsync(
1242return await InteractionService.PromptForStringAsync(promptText, binding: PromptBinding.CreateDefault(input.Value), required: input.Required, cancellationToken: cancellationToken);
1262return await InteractionService.PromptForStringAsync(
1335var value = await InteractionService.PromptForFilePathAsync(
1352var singleValue = await InteractionService.PromptForFilePathAsync(
Commands\RenderCommand.cs (67)
129InteractionService.DisplayEmptyLine();
132var choice = await InteractionService.PromptForSelectionAsync(
204InteractionService.DisplayError($"Unknown render scenario '{choice}'.");
205InteractionService.DisplayPlainText("Use 'aspire render --list-scenarios' to see supported values.");
219InteractionService.DisplayPlainText($"{choice.Key}: {choice.Value}");
222InteractionService.DisplayEmptyLine();
226InteractionService.DisplayPlainText($"{scenario.Key}: {scenario.Value}");
234InteractionService.DisplayMessage(emoji, $"DisplayMessage with {emoji.Name}");
237InteractionService.DisplayEmptyLine();
238InteractionService.DisplayMessage(KnownEmojis.Rocket, "This is a much longer message that is designed to test how text wraps when the terminal window is narrow. It should wrap cleanly beneath the text column without pushing content under the emoji icon on the left side of the display.");
239InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, "Successfully deployed the application to the remote environment. The deployment included 14 services, 3 databases, and 2 message brokers. All health checks passed and the application is now accepting traffic on the configured endpoints.");
240InteractionService.DisplayError("Something went terribly wrong while attempting to connect to the remote application host. The connection timed out after 30 seconds. Please verify that the host is running and that the network configuration allows traffic on the specified port.");
247InteractionService.DisplayError("This is an error message.");
248InteractionService.DisplaySuccess("Operation completed successfully.");
249InteractionService.DisplaySubtleMessage("This is a subtle hint.");
250InteractionService.DisplayCancellationMessage();
252InteractionService.DisplayEmptyLine();
253InteractionService.DisplayError("Failed to resolve package 'Aspire.Hosting.Azure.CosmosDB' version 9.2.0. The package source 'https://api.nuget.org/v3/index.json' returned a 503 Service Unavailable response. Please check your network connection and try again, or configure an alternative package source in your NuGet.config file.");
254InteractionService.DisplaySuccess("All 47 integration tests passed successfully across 2 target frameworks (net10.0, net11.0). Total execution time: 2 minutes and 14 seconds. Code coverage increased from 78.3% to 82.1%.");
262await InteractionService.ShowStatusAsync(
277await InteractionService.ShowStatusAsync(
292await InteractionService.ShowStatusAsync(
316var selected = await InteractionService.PromptForSelectionAsync(
329var selected = await InteractionService.PromptForSelectionAsync(
335InteractionService.DisplayMessage(KnownEmojis.Rocket, $"Deploying to {selected}...");
341InteractionService.DisplayMessage(KnownEmojis.Rocket, "Starting mixed methods test...");
342InteractionService.DisplayEmptyLine();
344InteractionService.DisplaySuccess("Step 1 complete!");
345InteractionService.DisplaySubtleMessage("This is a subtle hint.");
346InteractionService.DisplayMessage(KnownEmojis.MagnifyingGlassTiltedLeft, "Searching for [packages]...");
347InteractionService.DisplayEmptyLine();
349InteractionService.DisplayMarkupLine("[bold green]Bold green markup[/] and [dim]dim text[/]");
350InteractionService.DisplayPlainText("Plain text with [brackets] that should appear literally.");
351InteractionService.DisplayEmptyLine();
353await InteractionService.ShowStatusAsync(
362InteractionService.ShowStatus(
367InteractionService.DisplayEmptyLine();
369var name = await InteractionService.PromptForStringAsync(
374InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, $"You entered: {name}");
376var confirmed = await InteractionService.PromptConfirmAsync(
383InteractionService.DisplaySuccess("Confirmed!");
387InteractionService.DisplayError("Cancelled.");
390InteractionService.DisplayEmptyLine();
391InteractionService.DisplayMessage(KnownEmojis.StopSign, "Mixed methods test complete.");
407InteractionService.DisplayMessage(KnownEmojis.Information, "This demo fires background log messages while a prompt is active.");
408InteractionService.DisplayMessage(KnownEmojis.Information, "Logs are buffered and flushed after the prompt completes.");
409InteractionService.DisplayEmptyLine();
427var answer = await InteractionService.PromptForStringAsync(
436InteractionService.DisplayEmptyLine();
437InteractionService.DisplaySuccess($"You entered: {answer}");
438InteractionService.DisplayMessage(KnownEmojis.CheckMarkButton, "Buffered log lines should appear above this message.");
448InteractionService.DisplaySubtleMessage($"Temporary file created at {filePath}", allowMarkup: false);
450InteractionService.DisplayPlainText($"Supports links: {InteractionService.SupportsLinks}");
451InteractionService.DisplayMarkupLine($"SafeLink: {MarkupHelpers.SafeLink(InteractionService, "https://www.aspire.dev/", "Aspire documentation")}");
452InteractionService.DisplayMarkupLine($"SafeFileLink: {MarkupHelpers.SafeFileLink(InteractionService, filePath)}");
463return InteractionService.DisplayIncompatibleVersionError(ex, ex.AspireHostingVersion ?? ex.RequiredCapability);
471InteractionService.DisplayPlainText($"=== {scenario.Title} ===");
579InteractionService.DisplayEmptyLine();
580InteractionService.DisplaySubtleMessage($"ProcessPublishingActivitiesDebugAsync returned succeeded={succeeded}", allowMarkup: false);
589InteractionService.DisplayEmptyLine();
590InteractionService.DisplaySubtleMessage($"ProcessAndDisplayPublishingActivitiesAsync returned succeeded={succeeded}", allowMarkup: false);
846InteractionService.DisplayMarkdown(MarkdownShowcase);
853InteractionService.DisplayRawText(plainText);
870InteractionService.DisplayRawText(writer.ToString());
Commands\RunCommand.cs (25)
180var isExtensionHost = ExtensionHelper.IsExtensionHost(InteractionService, out _, out _);
209if (!AppHostStartupTimeout.TryGetTimeoutSeconds(_configuration, InteractionService, out var timeoutSeconds))
226&& ExtensionHelper.IsExtensionHost(InteractionService, out var extensionInteractionService, out _)
349InteractionService.DisplayMessage(KnownEmojis.Warning, RunCommandStrings.IsolatedModeRunningInstanceWarning);
442InteractionService.DisplayLines(outputCollector.GetLines());
454InteractionService.DisplayMessage(KnownEmojis.Bug, InteractionServiceStrings.WaitingForDebuggerToAttachToAppHost);
489InteractionService.DisplayMessage(KnownEmojis.Warning, RunCommandStrings.DashboardFailedToStart);
495InteractionService,
502if (ExtensionHelper.IsExtensionHost(InteractionService, out var extInteractionService, out _))
535var showCtrlC = !ExtensionHelper.IsExtensionHost(InteractionService, out _, out _);
539return new Markup($"[bold]{resource.EscapeMarkup()}[/] [grey]has endpoint[/] {MarkupHelpers.SafeLink(InteractionService, endpoint)}");
611await InteractionService.DisplayLiveAsync(
626InteractionService.DisplayRenderable(BuildStaticEndpointRenderable(resource, endpoint, isFirstEndpoint));
648InteractionService.DisplayMessage(KnownEmojis.Warning, "No longer receiving logs from AppHost.");
711return HandleProjectLocatorException(ex, InteractionService, Telemetry);
717return CommandResult.FromExitCode(InteractionService.DisplayIncompatibleVersionError(ex, ex.AspireHostingVersion ?? ex.RequiredCapability));
921DisplayRecentAppHostStartupOutput(InteractionService, outputCollector, appHostStartupOutputStartIndex);
949DisplayRecentAppHostStartupOutput(InteractionService, outputCollector, appHostStartupOutputStartIndex);
962DisplayRecentAppHostStartupOutput(InteractionService, outputCollector, appHostStartupOutputStartIndex);
971var resolution = await InteractionService.ShowStatusAsync(
997backchannel = await InteractionService.ShowStatusAsync(
1011var pendingLogCapture = CaptureAppHostLogsAsync(_fileLoggerProvider, backchannel, InteractionService, logCaptureCancellationSource.Token);
1023dashboardUrls = await InteractionService.ShowStatusAsync(
1075if (ExtensionHelper.IsExtensionHost(InteractionService, out _, out _))
1080InteractionService.DisplayRenderable(BuildCtrlCRenderable(longestLocalizedLengthWithColon));
Commands\StopCommand.cs (25)
199InteractionService.DisplayError(appHostFile is null
207InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AmbiguousAppHostPid, processId));
237InteractionService.DisplayError(StopCommandStrings.CouldNotDetermineAppHostPath);
269InteractionService.DisplayError(errorMessage);
307InteractionService.DisplayMessage(KnownEmojis.Information, SharedCommandStrings.AppHostNotRunning);
311InteractionService.DisplayError(SharedCommandStrings.AppHostNotRunning);
320InteractionService.DisplayMessage(KnownEmojis.Information, SharedCommandStrings.AppHostNotRunning);
342InteractionService.DisplayError(string.Format(CultureInfo.InvariantCulture, StopCommandStrings.MultipleAppHostsNonInteractive, s_appHostOption.Name, s_allOption.Name));
367return new StopAppHostResult(AppHostConnectionResultHandler.DisplayFailureAsInformation(result, InteractionService), null);
405InteractionService.DisplayMessage(KnownEmojis.Information, string.Format(CultureInfo.CurrentCulture, SharedCommandStrings.AppHostNotRunningAtPath, displayPath));
437var cleanupResult = await InteractionService.ShowStatusAsync(
442InteractionService.DisplayPlainText("");
446InteractionService.DisplayError(StopCommandStrings.DcpCleanupUnavailable);
453InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.DcpCleanupFailed, appHostDisplayPath, details));
457InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.PersistentResourcesCleaned, appHostDisplayPath));
476InteractionService.DisplayMessage(KnownEmojis.Warning, StopCommandStrings.DcpCleanupCompatibilityCheckFailed);
482InteractionService.DisplayMessage(KnownEmojis.Warning, StopCommandStrings.DcpCleanupCompatibilityCheckFailed);
507InteractionService.DisplayMessage(KnownEmojis.Warning, string.Format(
555InteractionService.DisplayMessage(KnownEmojis.Information, SharedCommandStrings.AppHostNotRunning);
596InteractionService.DisplayMessage(KnownEmojis.Package, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.FoundRunningAppHost, appHostIdentifier));
599InteractionService.DisplayMessage(KnownEmojis.StopSign, string.Format(CultureInfo.CurrentCulture, StopCommandStrings.SendingStopSignal, appHostIdentifier));
601var stopped = await InteractionService.ShowStatusAsync(
608InteractionService.DisplayPlainText("");
618InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.AppHostStoppedSuccessfully, appHostIdentifier));
623InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, StopCommandStrings.FailedToStopAppHost, appHostIdentifier));
Commands\TelemetrySpansCommand.cs (9)
92_connectionResolver, InteractionService, _httpClientFactory, _logger, passedAppHostProjectFile, dashboardUrl, apiKey, requireDashboard: true, cancellationToken);
130InteractionService.DisplayError($"Resource '{resource}' not found.");
156TelemetryCommandHelpers.DisplayTelemetryError(InteractionService, errorInfo);
173InteractionService.DisplayRawText(SharedAIHelpers.SerializeSpansToJson(resourceSpans, getResourceName, dashboardUrl), ConsoleOutput.Standard);
191await foreach (var line in reader.ReadLinesWithDisconnectHandlingAsync(InteractionService, cancellationToken))
198InteractionService.DisplayRawText(SharedAIHelpers.SerializeSpansToJson(resourceSpans, getResourceName, dashboardUrl), ConsoleOutput.Standard);
216TelemetryCommandHelpers.DisplayNoData(InteractionService, "spans");
269var spanIdLink = TelemetryCommandHelpers.FormatTraceLink(InteractionService, dashboardUrl, traceId, shortSpanId, spanId: spanId);
274InteractionService.DisplayMarkupLine($"[grey]{timestamp}[/] [{statusColor}]{statusText}[/] [white]{durationStr,8}[/] [{resourceColor}]{resourceName.EscapeMarkup()}[/]: {escapedName} [grey]{spanIdLink}[/]");
Commands\TelemetryTracesCommand.cs (21)
90_connectionResolver, InteractionService, _httpClientFactory, _logger, passedAppHostProjectFile, dashboardUrl, apiKey, requireDashboard: true, cancellationToken);
112TelemetryCommandHelpers.DisplayTelemetryError(InteractionService, errorInfo);
145InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, TelemetryCommandStrings.TraceNotFound, traceId));
162InteractionService.DisplayRawText("[]", ConsoleOutput.Standard);
167InteractionService.DisplayRawText(SharedAIHelpers.SerializeTraceToJson(trace, getResourceName, dashboardUrl), ConsoleOutput.Standard);
197InteractionService.DisplayError($"Resource '{resource}' not found.");
222InteractionService.DisplayRawText(SharedAIHelpers.SerializeTracesToJson(resourceSpans, getResourceName, dashboardUrl), ConsoleOutput.Standard);
239TelemetryCommandHelpers.DisplayNoData(InteractionService, "traces");
297var traceLink = TelemetryCommandHelpers.FormatTraceLink(InteractionService, dashboardUrl, info.TraceId, shortTraceId);
302InteractionService.DisplayRenderable(table);
303InteractionService.DisplayMarkupLine($"[grey]Showing {traceInfos.Count} of {response?.TotalCount ?? traceInfos.Count} traces[/]");
335var traceLink = TelemetryCommandHelpers.FormatTraceLink(InteractionService, dashboardUrl, traceId, shortTraceId);
339InteractionService.DisplayMarkupLine($"[bold]Trace:[/] {traceLink}");
340InteractionService.DisplayMarkupLine("[dim]No spans found[/]");
349InteractionService.DisplayMarkupLine($"[bold]Trace:[/] {traceLink}");
350InteractionService.DisplayMarkupLine($"[bold]Duration:[/] {TelemetryCommandHelpers.FormatDuration(totalDuration)} [bold]Spans:[/] {spans.Count}");
351InteractionService.DisplayEmptyLine();
395InteractionService.DisplayEmptyLine(); // Blank line between resources
398InteractionService.DisplayMarkupLine($"{indent}[bold {resourceColor}]{span.ResourceName.EscapeMarkup()}[/]");
411var spanIdLink = TelemetryCommandHelpers.FormatTraceLink(InteractionService, dashboardUrl, traceId, shortenedSpanId, spanId: span.SpanId);
420InteractionService.DisplayMarkupLine($"{indent}{connector} [dim]{spanIdLink}[/] {displayName} [{statusColor}]{statusText}[/] [dim]{durationStr}[/]");
Commands\UpdateCommand.cs (44)
166InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage);
167InteractionService.DisplayPlainText($" {dotNetToolUpdateCommand}");
177InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage);
178InteractionService.DisplayPlainText($" {npmUpdateCommand}");
259var allChannels = await InteractionService.ShowStatusAsync(
347channel = await InteractionService.PromptForSelectionAsync(
413var shouldUpdateCli = await InteractionService.PromptConfirmAsync(
423InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage);
424InteractionService.DisplayPlainText($" {dotNetToolUpdateCommand}");
431InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage);
432InteractionService.DisplayPlainText($" {npmUpdateCommand}");
465var shouldUpdateCli = await InteractionService.PromptConfirmAsync(
477return HandleProjectLocatorException(ex, InteractionService, Telemetry);
532InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.PendingMigrationsHeader);
535InteractionService.DisplaySubtleMessage($" - {descriptor.Title}");
538InteractionService.DisplaySubtleMessage(UpdateCommandStrings.PendingMigrationsHint);
544InteractionService.DisplaySubtleMessage(MigrationStrings.NothingToMigrate);
548InteractionService.DisplayMessage(KnownEmojis.Gear, MigrationStrings.AvailableMigrationsHeader);
551InteractionService.DisplaySubtleMessage($" - {descriptor.Title}");
557var confirmed = await InteractionService.PromptConfirmAsync(
563InteractionService.DisplaySubtleMessage(MigrationStrings.MigrationCancelled);
582InteractionService.DisplayMessage(KnownEmojis.Warning, UpdateCommandStrings.MigrationApplyFailedWarning);
626InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage);
630var shouldUpdateCli = await InteractionService.PromptConfirmAsync(
643InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.DotNetToolSelfUpdateMessage);
644InteractionService.DisplayPlainText($" {dotNetToolUpdateCommand}");
645InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage);
652InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NpmSelfUpdateMessage);
653InteractionService.DisplayPlainText($" {npmUpdateCommand}");
654InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage);
661InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.ProjectUpdateSkippedAfterCliUpdateMessage);
705InteractionService.DisplayMessage(KnownEmojis.Information, UpdateCommandStrings.NixSelfUpdateMessage);
706InteractionService.DisplayPlainText(" nix profile upgrade aspire-cli");
707InteractionService.DisplayPlainText(" nix flake update <input-name>");
747InteractionService.DisplayError(
755channel = await InteractionService.PromptForSelectionAsync(
773InteractionService.DisplayMessage(KnownEmojis.Package, $"Current CLI location: {currentExePath}");
774InteractionService.DisplayMessage(KnownEmojis.UpButton, $"Updating to channel: {channel}");
821await InteractionService.ShowStatusAsync(
830InteractionService.DisplayMessage(KnownEmojis.Package, UpdateCommandStrings.ExtractedNewCli);
852InteractionService.DisplayMessage(KnownEmojis.FloppyDisk, "Backing up current CLI...");
864InteractionService.DisplayMessage(KnownEmojis.Wrench, $"Installing new CLI to {installDir}...");
888InteractionService.DisplayMessage(KnownEmojis.Information, $"Note: {installDir} is not in your PATH. Add it to use the updated CLI globally.");
974InteractionService.DisplaySuccess($"Updated to version: {version}");
Commands\WaitCommand.cs (7)
92return CommandResult.FromExitCode(AppHostConnectionResultHandler.DisplayFailureAsError(result, InteractionService, CliExitCodes.FailedToFindProject));
113var exitCode = await InteractionService.ShowStatusAsync(
131InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceNotFound, resourceName));
137InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.WaitTimedOut, resourceName, statusLabel, timeoutSeconds));
142InteractionService.DisplayError(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceEnteredFailedState, resourceName, response.State ?? response.ErrorMessage));
147InteractionService.DisplayPlainText("");
152InteractionService.DisplaySuccess(string.Format(CultureInfo.CurrentCulture, WaitCommandStrings.ResourceReachedTargetStatus, resourceName, statusLabel, elapsed.TotalSeconds));