mirror of
https://github.com/tiennm99/ccs.git
synced 2026-07-17 12:16:59 +00:00
fix(cliproxy): silence legacy-config skip in pool opt-in prompt
Legacy profiles.json-only installs get pool guidance exclusively from ccs doctor (once-per-install semantics); printing a migrate notice on every account add nagged with no dismissal available. Also document why type === 'account' profiles are Claude by schema in the onboarding counter, so the filter is not misread as over-counting.
This commit is contained in:
@@ -96,6 +96,11 @@ function isPoolEnabled(config?: UnifiedConfig): boolean {
|
||||
*
|
||||
* Uses ProfileRegistry so the count respects both legacy profiles.json and
|
||||
* unified config accounts - same source of truth as the rest of the codebase.
|
||||
*
|
||||
* type === 'account' implies Claude: per the profile-registry schema, every
|
||||
* account profile is an isolated Claude instance (CLAUDE_CONFIG_DIR lane) with
|
||||
* no CLI discriminator. Gemini/Codex multi-account lives in CLIProxy auth
|
||||
* files, never in profiles.json, so this filter cannot over-count.
|
||||
*/
|
||||
export function countNativeClaudeProfiles(): number {
|
||||
try {
|
||||
|
||||
@@ -149,13 +149,10 @@ export async function maybeOfferPoolRouting(
|
||||
// orphaning the user's config.json profiles. Skip entirely before any prompt
|
||||
// or dismissal persistence. Mirrors the guards in create-command.ts and
|
||||
// account-flow.ts and the hazard documented in pool-onboarding-hint.ts.
|
||||
// Silent by design: legacy installs receive pool guidance exclusively from
|
||||
// ccs doctor (pool-onboarding-hint site 1); printing here would nag on every
|
||||
// account add with no dismissal available.
|
||||
if (!hasUnifiedConfig()) {
|
||||
console.log(
|
||||
info(
|
||||
'[i] Multiple accounts detected, but pool routing needs the unified config. ' +
|
||||
"Run 'ccs migrate' first, then 'ccs cliproxy pool --enable'."
|
||||
)
|
||||
);
|
||||
return { prompted: false, enabled: false, skipped: true, skipReason: 'legacy-config' };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user