From 270b8e606db39e76b7164b6e913a2bbdeb15d45e Mon Sep 17 00:00:00 2001 From: Oleksandr Taruraiev Date: Tue, 7 Jul 2026 16:16:02 +0300 Subject: [PATCH] fix(assistants): load registered assistants from top-level config in setup flow ConfigLoader.load() only merges profile-level data, which does not contain codemieAssistants after migration 004 moved them to the top-level MultiProviderConfig. This caused the Registered tab in the CLI assistant selection panel to always show 0 assistants. Replace the profile-based read with loadRegisteredAssistants(), which correctly loads from both global and local top-level config with file verification. Fixes EPMCDME-13372 --- src/cli/commands/assistants/setup/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cli/commands/assistants/setup/index.ts b/src/cli/commands/assistants/setup/index.ts index 6372235b..cc0c3663 100644 --- a/src/cli/commands/assistants/setup/index.ts +++ b/src/cli/commands/assistants/setup/index.ts @@ -2,7 +2,7 @@ import { Command } from 'commander'; import chalk from 'chalk'; import type { Assistant, AssistantBase } from 'codemie-sdk'; import { logger } from '@/utils/logger.js'; -import { ConfigLoader } from '@/utils/config.js'; +import { ConfigLoader, loadRegisteredAssistants } from '@/utils/config.js'; import { StorageScope } from '@/env/types.js'; import type { CodemieAssistant } from '@/env/types.js'; import { MESSAGES, ACTIONS } from '@/cli/commands/assistants/constants.js'; @@ -66,7 +66,7 @@ async function setupAssistants(options: SetupCommandOptions, hostAgent?: TargetA const config = await ConfigLoader.load(workingDir, { name: profileName }); const client = await getAuthenticatedClient(config); - const registeredAssistants = config.codemieAssistants || []; + const registeredAssistants = await loadRegisteredAssistants(); config.codemieAssistants = registeredAssistants; const { selectedIds, action } = await promptAssistantSelection(config, options, client);