mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-08 20:30:53 -07:00
fix(cli): resolve hook visibility and restore original settings configuration
This commit is contained in:
@@ -11,6 +11,7 @@ import { useUIState } from '../contexts/UIStateContext.js';
|
||||
import { useSettings } from '../contexts/SettingsContext.js';
|
||||
import { useConfig } from '../contexts/ConfigContext.js';
|
||||
import { ContextSummaryDisplay } from './ContextSummaryDisplay.js';
|
||||
import { HookStatusDisplay } from './HookStatusDisplay.js';
|
||||
|
||||
interface StatusDisplayProps {
|
||||
hideContextSummary: boolean;
|
||||
@@ -27,6 +28,20 @@ export const StatusDisplay: React.FC<StatusDisplayProps> = ({
|
||||
return <Text color={theme.status.error}>|⌐■_■|</Text>;
|
||||
}
|
||||
|
||||
// In legacy layout, we show hooks here.
|
||||
// In experimental layout, hooks are shown in the top row of the composer,
|
||||
// but we still show them here if they are "system" hooks or if notifications are enabled.
|
||||
const isLegacyLayout =
|
||||
(settings.merged.ui as Record<string, unknown>)['useLegacyLayout'] === true;
|
||||
|
||||
if (
|
||||
isLegacyLayout &&
|
||||
uiState.activeHooks.length > 0 &&
|
||||
settings.merged.hooksConfig.notifications
|
||||
) {
|
||||
return <HookStatusDisplay activeHooks={uiState.activeHooks} />;
|
||||
}
|
||||
|
||||
if (!settings.merged.ui.hideContextSummary && !hideContextSummary) {
|
||||
return (
|
||||
<ContextSummaryDisplay
|
||||
|
||||
Reference in New Issue
Block a user