Add open AppHost source action to VS Code extension#15668
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 15668Or
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 15668" |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new “Open AppHost Source” action to the VS Code extension’s Running AppHosts tree so users can jump from a running AppHost entry to the underlying source file (with .csproj paths resolving to source when possible).
Changes:
- Added an
openAppHostSourcecommand and tree-provider handler to open the resolved AppHost source file in the editor. - Implemented
resolveAppHostSourcePathto prefer openingAppHost.cs(or fall back toProgram.cs/.csproj). - Added localization entries and unit tests for the resolution rules.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| extension/src/views/AspireAppHostTreeProvider.ts | Adds source-path resolution helper and the command handler that opens the resolved file. |
| extension/src/extension.ts | Registers the new aspire-vscode.openAppHostSource command. |
| extension/src/loc/strings.ts | Adds localized warning strings for “not found” and “open failed” cases. |
| extension/src/test/appHostTreeView.test.ts | Adds unit tests for resolveAppHostSourcePath. |
| extension/package.json | Contributes the new command and wires it into the Running AppHosts view item context menu. |
| extension/package.nls.json | Adds manifest-localized strings for the new command and warnings. |
| extension/loc/xlf/aspire-vscode.xlf | Adds XLF entries for the new strings/command title. |
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Re-running the failed jobs in the CI workflow for this pull request because 1 job was identified as retry-safe transient failures in the CI run attempt.
|
|
🎬 CLI E2E Test Recordings — 52 recordings uploaded (commit View recordings
📹 Recordings uploaded automatically from CI run #23681447806 |
* Add open AppHost source action to VS Code extension Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Handle lowercase apphost source file Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address PR review feedback Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Documentation Review — No Docs PR RequiredAfter reviewing the changes in this PR, no documentation update is needed on aspire.dev. Reason: This PR adds an "Open AppHost source" context menu action to the VS Code extension's Running AppHosts tree view. All changes are internal to the
|
Description
Adds an
Open AppHost sourceaction to the VS Code extension's Running AppHosts view.The action uses the trusted
appHostPathalready provided by the running AppHost data. Non-.csprojAppHosts open directly. For C# AppHosts reported as a.csproj, the command resolves toAppHost.cs,apphost.cs, orProgram.cs, and only falls back to the project file if no source file is present.The change also adds localization, tests for the source path resolution rules, and warning handling when the target file can't be opened or the command is invoked without a tree item.
Checklist
<remarks />and<code />elements on your triple slash comments?aspire.devissue: