diff --git a/packages/cli/src/ui/components/StatusRow.tsx b/packages/cli/src/ui/components/StatusRow.tsx index adaa339a64..ad168464fe 100644 --- a/packages/cli/src/ui/components/StatusRow.tsx +++ b/packages/cli/src/ui/components/StatusRow.tsx @@ -16,6 +16,7 @@ import { type ActiveHook } from '../types.js'; import { useUIState } from '../contexts/UIStateContext.js'; import { useSettings } from '../contexts/SettingsContext.js'; import { theme } from '../semantic-colors.js'; +import { useConfig } from '../contexts/ConfigContext.js'; import { GENERIC_WORKING_LABEL } from '../textConstants.js'; import { INTERACTIVE_SHELL_WAITING_PHRASE } from '../hooks/usePhraseCycler.js'; import { LoadingIndicator } from './LoadingIndicator.js'; @@ -146,6 +147,22 @@ export const StatusNode: React.FC<{ ); }; +/** + * Renders an indicator for the currently active agent team. + */ +const ActiveTeamIndicator: React.FC = () => { + const config = useConfig(); + const activeTeam = config?.getActiveTeam(); + + if (!activeTeam) return null; + + return ( + + [ Team: {activeTeam.displayName} ] + + ); +}; + export const StatusRow: React.FC = ({ showUiDetails, isNarrow, @@ -393,6 +410,7 @@ export const StatusRow: React.FC = ({ )} + ) : ( showRow2Minimal && diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index 617f4c7dbd..b8b97528f8 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -21,8 +21,8 @@ import { type ContentGeneratorConfig, } from '../core/contentGenerator.js'; import type { OverageStrategy } from '../billing/billing.js'; -import { PromptRegistry } from '../prompts/prompt-registry.js'; -import { ResourceRegistry } from '../resources/resource-registry.js'; +import type { PromptRegistry } from '../prompts/prompt-registry.js'; +import type { ResourceRegistry } from '../resources/resource-registry.js'; import { ToolRegistry } from '../tools/tool-registry.js'; import { LSTool } from '../tools/ls.js'; import { ReadFileTool } from '../tools/read-file.js'; @@ -1375,6 +1375,8 @@ export class Config implements McpContext, AgentLoopContext { this._geminiClient = new GeminiClient(this); this.a2aClientManager = new A2AClientManager(this); this.modelRouterService = new ModelRouterService(this); + this.agentRegistry = new AgentRegistry(this); + this.teamRegistry = new TeamRegistry(this, this.agentRegistry); } get config(): Config { @@ -1427,13 +1429,8 @@ export class Config implements McpContext, AgentLoopContext { if (this.getCheckpointingEnabled()) { await this.getGitService(); } - this._promptRegistry = new PromptRegistry(); - this._resourceRegistry = new ResourceRegistry(); - this.agentRegistry = new AgentRegistry(this); await this.agentRegistry.initialize(); - - this.teamRegistry = new TeamRegistry(this, this.agentRegistry); await this.teamRegistry.initialize(); coreEvents.on(CoreEvent.AgentsRefreshed, this.onAgentsRefreshed); @@ -3774,5 +3771,6 @@ export class Config implements McpContext, AgentLoopContext { } } } + // Export model constants for use in CLI export { DEFAULT_GEMINI_FLASH_MODEL };