From aaf80dbfd838fe22d6f4452307b36f837bb869b1 Mon Sep 17 00:00:00 2001 From: chenbaowang <49091147+Rsweater@users.noreply.github.com> Date: Mon, 20 Apr 2026 16:36:09 +0800 Subject: [PATCH] fix(cli): sort agent lists alphabetically and fix spinner residue - Sort universal and non-universal agent lists by name in selectAgentsInteractive - Exclude agents with showInUniversalList===false from locked section - Replace spinner.stop() with spinner.succeed() before interactive prompts to prevent 'Fetching' text from appearing as the step title - Also fix spinner.stop -> spinner.succeed for 'Installation complete' --- skillhub-cli/src/commands/install.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/skillhub-cli/src/commands/install.ts b/skillhub-cli/src/commands/install.ts index 7d00fff0..a96615f6 100644 --- a/skillhub-cli/src/commands/install.ts +++ b/skillhub-cli/src/commands/install.ts @@ -57,8 +57,13 @@ async function selectAgentsInteractive(isGlobal: boolean): Promise isUniversalForScope(a, isGlobal)); - const nonUniversalAgents = allAgents.filter((a) => !isUniversalForScope(a, isGlobal)); + // Exclude agents with showInUniversalList === false from the locked section. + const universalAgents = allAgents + .filter((a) => isUniversalForScope(a, isGlobal) && a.showInUniversalList !== false) + .sort((a, b) => a.name.localeCompare(b.name)); + const nonUniversalAgents = allAgents + .filter((a) => !isUniversalForScope(a, isGlobal)) + .sort((a, b) => a.name.localeCompare(b.name)); const canonicalLabel = isGlobal ? "Universal (~/.agents/skills)" : "Universal (.agents/skills)"; const lockedSection = { @@ -214,7 +219,7 @@ async function installFromRegistry(slug: string, opts: Record r.success); @@ -756,7 +761,7 @@ async function installFromGit(skillName: string, source: string, sourceType: Sou } } - spinner.stop("Installation complete"); + spinner.succeed("Installation complete"); console.log(""); const successful = results.filter((r) => r.success);