feat(profiles): refactor profiles to centralize logic in core

Centralized profile loading and management in packages/core.
Updated CLI commands to use core ProfileManager.
Implemented persistent profile selection in loadCliConfig.
Standardized profile format as Markdown with YAML frontmatter.
Verified multi-extension loading with 'coder' profile.
This commit is contained in:
Rahul Kamat
2026-03-11 17:45:26 -07:00
parent a04c593eb2
commit 0ec0c6ec08
26 changed files with 873 additions and 645 deletions
@@ -5,9 +5,7 @@
*/
import { type CommandModule } from 'yargs';
import { loadSettings } from '../../config/settings.js';
import { ProfileManager } from '../../config/profile-manager.js';
import { debugLogger } from '@google/gemini-cli-core';
import { Storage, ProfileManager, debugLogger } from '@google/gemini-cli-core';
import { exitCli } from '../utils.js';
/**
@@ -24,8 +22,8 @@ export const uninstallCommand: CommandModule = {
handler: async (argv) => {
const name = String(argv['name']);
try {
const settings = loadSettings();
const manager = new ProfileManager(settings);
const manager = new ProfileManager(Storage.getProfilesDir());
await manager.load();
await manager.uninstallProfile(name);
debugLogger.log(`Profile "${name}" successfully uninstalled.`);