feat(extensions): add 'delete' as an alias for /extensions uninstall (#25660)

Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
This commit is contained in:
Martin
2026-05-01 04:50:06 +08:00
committed by GitHub
parent 2f0c7518ad
commit d494195602
2 changed files with 8 additions and 0 deletions
@@ -782,6 +782,13 @@ describe('extensionsCommand', () => {
expect(mockUninstallExtension).not.toHaveBeenCalled();
});
it('should expose "delete" as an alias', () => {
const uninstallCmd = extensionsCommand(true).subCommands?.find(
(cmd) => cmd.name === 'uninstall',
);
expect(uninstallCmd?.altNames).toContain('delete');
});
it('should call uninstallExtension and show success message', async () => {
const extensionName = 'test-extension';
await uninstallAction!(mockContext, extensionName);
@@ -838,6 +838,7 @@ const linkCommand: SlashCommand = {
const uninstallCommand: SlashCommand = {
name: 'uninstall',
altNames: ['delete'],
description: 'Uninstall an extension',
kind: CommandKind.BUILT_IN,
autoExecute: false,