Skip to content

Clean up extension #9988

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 23, 2025
Merged

Conversation

adamint
Copy link
Member

@adamint adamint commented Jun 23, 2025

Cleans up some of the extension code.

  • removes owners.txt since that was an azdo-ism
  • replaces some hardcoded strings with localized versions
  • adds additional commands to replicate the cli command surface
  • replaces emoji names from cli (like :ice:) with their unicode values so they are displayed correctly. taking a dependency on node-emoji was leading to some issues and it was easier to maintain an emoji-name map myself
  • puts all interaction service endpoints behind auth
  • fixes parameter retrieval over the rpc endpoint in withAuthentication
  • cleans up a few interaction service endpoints and sends requests back to the cli for versioning and prompt value validation

@adamint adamint requested review from mitchdenny and Copilot June 23, 2025 03:18
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 23, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR cleans up the VSCode extension by removing legacy files, introducing localization, expanding CLI command support, and tightening RPC authentication.

  • Replace hardcoded strings with localized resources and build an emoji mapping utility.
  • Refactor RPC authentication wrapper to accept variadic parameters and localize server messages.
  • Add new CLI commands (new, config, deploy, publish) to match the CLI surface.

Reviewed Changes

Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
extension/src/utils/terminal.ts Use aspireTerminalName constant instead of a hardcoded string.
extension/src/utils/strings.ts Introduce emojiMap and formatText for inline emoji support.
extension/src/server/rpcServer.ts Update withAuthentication logic and localize listening output.
extension/src/server/rpcClient.ts Simplify RPC call signatures for prompt validation.
extension/src/server/interactionService.ts Apply formatText everywhere and enhance version error output.
extension/src/extension.ts Register new CLI commands (new, config, deploy, publish).
extension/src/commands/*.ts Implement handlers for each new CLI command.
extension/src/constants/strings.ts Add localized strings for new commands and error messages.
extension/package.nls.*.json Update translations to include new command titles and messages.
extension/package.json Contribute new commands in the contributes.commands section.
extension/owners.txt Remove outdated Azure DevOps owners file.
Comments suppressed due to low confidence (1)

extension/src/commands/new.ts:5

  • The new CLI commands (new, config, deploy, publish) currently lack automated tests. Consider adding unit or integration tests to verify each command invokes getAspireTerminal and sends the correct aspire ... text.
export async function newCommand() {

if (Array.isArray(params)) {
(params as any[]).shift();
}

Copy link
Preview

Copilot AI Jun 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The early return callback(params); prevents the token-stripping logic from ever running and passes the full params array to the callback. Move the return after the shift() block and remove this unreachable return so the token is removed before invoking the callback.

Suggested change

Copilot uses AI. Check for mistakes.

];

errorLines.forEach(line => {
vscode.window.showErrorMessage(line);
this._outputChannelWriter.appendLine(line);
vscode.window.showErrorMessage(formatText(line));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this visually look like? Are you popping an error message for each line?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently looks like this: (newlines cannot be rendered in showErrorMessage)
image

I've changed it to this now
image

@adamint adamint merged commit b4a083f into dotnet:main Jun 23, 2025
252 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Jul 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants