Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions extension/src/editor/AspireCodeLensProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -287,11 +287,11 @@ export class AspireCodeLensProvider implements vscode.CodeLensProvider {
if (resource.commands) {
for (const [cmdName, cmd] of Object.entries(resource.commands) as [string, ResourceCommandJson][]) {
if (!standardCommands.has(cmdName)) {
const label = codeLensCommand(cmd.description ?? cmdName);
const label = codeLensCommand(cmd.displayName ?? cmdName);
lenses.push(new vscode.CodeLens(range, {
title: label,
command: 'aspire-vscode.codeLensResourceAction',
tooltip: cmd.description ?? cmdName,
tooltip: cmd.description ?? cmd.displayName ?? cmdName,
arguments: [resource.name, cmdName, appHost.appHostPath],
Comment thread
JamesNK marked this conversation as resolved.
Outdated
}));
}
Expand Down
1 change: 1 addition & 0 deletions extension/src/views/AppHostDataRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface ResourceUrlJson {
}

export interface ResourceCommandJson {
displayName: string | null;
description: string | null;
}

Expand Down
1 change: 1 addition & 0 deletions src/Aspire.Cli/Backchannel/ResourceSnapshotMapper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ public static ResourceJson MapToResourceJson(ResourceSnapshot snapshot, IReadOnl
c => c.Name,
c => new ResourceCommandJson
{
DisplayName = c.DisplayName,
Comment thread
JamesNK marked this conversation as resolved.
Outdated
Description = c.Description,
Visibility = IsDefaultCommandVisibility(c.Visibility) ? null : c.Visibility,
ArgumentInputs = c.ArgumentInputs.Length > 0
Expand Down
1 change: 1 addition & 0 deletions src/Aspire.Dashboard/Model/TelemetryExportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -773,6 +773,7 @@ internal static ResourceJson CreateResourceJson(ResourceViewModel resource, IRea
c => c.Name,
c => new ResourceCommandJson
{
DisplayName = c.GetDisplayName(),
Description = c.GetDisplayDescription()
})
: null,
Expand Down
5 changes: 5 additions & 0 deletions src/Shared/Model/Serialization/ResourceJson.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ internal sealed class ResourceRelationshipJson
/// </summary>
internal sealed class ResourceCommandJson
{
/// <summary>
/// The display name of the command.
/// </summary>
public string? DisplayName { get; set; }

/// <summary>
/// The description of the command.
/// </summary>
Expand Down
Loading