fix(coding-agent): add uninstall alias

closes #2051
This commit is contained in:
Mario Zechner
2026-03-14 05:44:39 +01:00
parent 4f81c3c28d
commit c3fc724887
3 changed files with 25 additions and 14 deletions

View File

@@ -183,12 +183,13 @@ ${chalk.bold("Usage:")}
${APP_NAME} [options] [@files...] [messages...]
${chalk.bold("Commands:")}
${APP_NAME} install <source> [-l] Install extension source and add to settings
${APP_NAME} remove <source> [-l] Remove extension source from settings
${APP_NAME} update [source] Update installed extensions (skips pinned sources)
${APP_NAME} list List installed extensions from settings
${APP_NAME} config Open TUI to enable/disable package resources
${APP_NAME} <command> --help Show help for install/remove/update/list
${APP_NAME} install <source> [-l] Install extension source and add to settings
${APP_NAME} remove <source> [-l] Remove extension source from settings
${APP_NAME} uninstall <source> [-l] Alias for remove
${APP_NAME} update [source] Update installed extensions (skips pinned sources)
${APP_NAME} list List installed extensions from settings
${APP_NAME} config Open TUI to enable/disable package resources
${APP_NAME} <command> --help Show help for install/remove/uninstall/update/list
${chalk.bold("Options:")}
--provider <name> Provider name (default: google)

View File

@@ -118,12 +118,14 @@ Examples:
${getPackageCommandUsage("remove")}
Remove a package and its source from settings.
Alias: ${APP_NAME} uninstall <source> [-l]
Options:
-l, --local Remove from project settings (.pi/settings.json)
Example:
Examples:
${APP_NAME} remove npm:@foo/bar
${APP_NAME} uninstall npm:@foo/bar
`);
return;
@@ -147,8 +149,14 @@ List installed packages from user and project settings.
}
function parsePackageCommand(args: string[]): PackageCommandOptions | undefined {
const [command, ...rest] = args;
if (command !== "install" && command !== "remove" && command !== "update" && command !== "list") {
const [rawCommand, ...rest] = args;
let command: PackageCommand | undefined;
if (rawCommand === "uninstall") {
command = "remove";
} else if (rawCommand === "install" || rawCommand === "remove" || rawCommand === "update" || rawCommand === "list") {
command = rawCommand;
}
if (!command) {
return undefined;
}