mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-30 13:43:00 -07:00
feat(cli): add active team indicator and sample teams; fix startup crash
- Add ActiveTeamIndicator to StatusRow.tsx - Create 'Coding Team' and 'Creative Writing Team' sample definitions - Move registry instantiations to Config constructor to prevent startup race conditions - Resolve syntax corruptions in Config.ts and StatusRow.tsx - Ensure core tests and CLI build are clean
This commit is contained in:
@@ -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 (
|
||||
<Box marginLeft={LAYOUT.INDICATOR_LEFT_MARGIN}>
|
||||
<Text color={theme.text.accent}>[ Team: {activeTeam.displayName} ]</Text>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
export const StatusRow: React.FC<StatusRowProps> = ({
|
||||
showUiDetails,
|
||||
isNarrow,
|
||||
@@ -393,6 +410,7 @@ export const StatusRow: React.FC<StatusRowProps> = ({
|
||||
<RawMarkdownIndicator />
|
||||
</Box>
|
||||
)}
|
||||
<ActiveTeamIndicator />
|
||||
</>
|
||||
) : (
|
||||
showRow2Minimal &&
|
||||
|
||||
Reference in New Issue
Block a user