Support `HelpText` on `RequiredCommandAnnotation`
- Dominant language
- C#
- Stars
- 6.3k
- Forks
- 991
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 201
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Is your feature request related to a problem? Please describe the problem.
Currently when using `RequiredCommandAnnotation`, the only way to provide additional guidance on how to install the missing command is to add a `HelpLink`. But sometimes you may not have a page to link to, or the link may just provide another layer of indirection that can be put inline.
### Describe the solution you'd like
I'd like to see a way to specify help text rather than a link. This text would then be included in the missing command notification banner.
```cs
builder.WithRequiredCommand("myapp", new { HelpText = "Run `winget install myapp` to install" }
```
### Additional context
Care will need to be taken to avoid conflicting with the existing `WithRequiredCommand` overload, so it probably requires introducing an options argument so you can dis-ambiguate between `HelpLink` and `HelpText`
https://github.com/microsoft/aspire/blob/85e57f06e5590db04308562d1983b53203255083/src/Aspire.Hosting/RequiredCommandResourceExtensions.cs#L29-L32
Contributor guide
Research direction
Start in src/Aspire.Hosting/RequiredCommandResourceExtensions.cs at the existing WithRequiredCommand overload linked in the issue, then trace RequiredCommandAnnotation and the missing-command notification. Determine how an options argument can distinguish HelpText from HelpLink without conflicting with the current overload. Done means callers can provide inline help text and that text appears in the missing command notification banner.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100