fix(install): address CodeRabbit review on agent picker wording

Two nits from CodeRabbit on the first-user picker:

1. detectAgent() returns 'universal' as a fallback when no concrete
   adapter is detected. Passing that through to quickAgentSelect made
   the picker show "Just Universal (detected)" even when no real
   agent was found — misleading. Treat 'universal' as "not detected"
   and fall through to the plain select/all options instead.

2. The "All detected agents" label on the bottom option was wrong:
   agents at the call site is getAllAdapters() (all supported
   adapters), not only detected ones. Rename to "All supported
   agents" and change the hint to "writes to every adapter" so
   users aren't tricked into thinking this is a safe detected-only
   install.
This commit is contained in:
Rohit Ghumare
2026-04-20 22:06:15 +01:00
parent aea3b3ba32
commit 2843bd3c5c
2 changed files with 4 additions and 3 deletions
+2 -1
View File
@@ -357,7 +357,8 @@ export class InstallCommand extends Command {
if (isInteractive) {
const allAgentTypes = getAllAdapters().map((a) => a.type);
const lastAgents = getLastAgents();
const detectedAgent = await detectAgent().catch(() => undefined);
const rawDetected = await detectAgent().catch(() => undefined);
const detectedAgent = rawDetected && rawDetected !== 'universal' ? rawDetected : undefined;
step(`Detected ${allAgentTypes.length} agents`);
+2 -2
View File
@@ -153,8 +153,8 @@ export async function quickAgentSelect(options: {
selectOptions.push({
value: 'all',
label: 'All detected agents',
hint: `${agents.length} agent${agents.length !== 1 ? 's' : ''} — use only if you know`,
label: 'All supported agents',
hint: `${agents.length} agent${agents.length !== 1 ? 's' : ''} — writes to every adapter`,
});
const result = await clack.select({