-
Notifications
You must be signed in to change notification settings - Fork 668
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
Clean up extension #9988
Conversation
There was a problem hiding this 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 invokesgetAspireTerminal
and sends the correctaspire ...
text.
export async function newCommand() {
if (Array.isArray(params)) { | ||
(params as any[]).shift(); | ||
} | ||
|
There was a problem hiding this comment.
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.
Copilot uses AI. Check for mistakes.
]; | ||
|
||
errorLines.forEach(line => { | ||
vscode.window.showErrorMessage(line); | ||
this._outputChannelWriter.appendLine(line); | ||
vscode.window.showErrorMessage(formatText(line)); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleans up some of the extension code.
: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 myselfwithAuthentication