feat(ui): add visual indicators for hook execution (#15408)

This commit is contained in:
Abhi
2026-01-06 15:52:12 -05:00
committed by GitHub
parent 86b5995f12
commit 61dbab03e0
27 changed files with 1124 additions and 73 deletions
+8 -3
View File
@@ -123,9 +123,11 @@ import { useSettings } from './contexts/SettingsContext.js';
import { terminalCapabilityManager } from './utils/terminalCapabilityManager.js';
import { useInputHistoryStore } from './hooks/useInputHistoryStore.js';
import { useBanner } from './hooks/useBanner.js';
const WARNING_PROMPT_DURATION_MS = 1000;
const QUEUE_ERROR_DISPLAY_DURATION_MS = 3000;
import { useHookDisplayState } from './hooks/useHookDisplayState.js';
import {
WARNING_PROMPT_DURATION_MS,
QUEUE_ERROR_DISPLAY_DURATION_MS,
} from './constants.js';
function isToolExecuting(pendingHistoryItems: HistoryItemWithoutId[]) {
return pendingHistoryItems.some((item) => {
@@ -189,6 +191,7 @@ export const AppContainer = (props: AppContainerProps) => {
useState<boolean>(false);
const [historyRemountKey, setHistoryRemountKey] = useState(0);
const [settingsNonce, setSettingsNonce] = useState(0);
const activeHooks = useHookDisplayState();
const [updateInfo, setUpdateInfo] = useState<UpdateObject | null>(null);
const [isTrustedFolder, setIsTrustedFolder] = useState<boolean | undefined>(
isWorkspaceTrusted(settings.merged).isTrusted,
@@ -1522,6 +1525,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
elapsedTime,
currentLoadingPhrase,
historyRemountKey,
activeHooks,
messageQueue,
queueErrorMessage,
showAutoAcceptIndicator,
@@ -1612,6 +1616,7 @@ Logging in with Google... Restarting Gemini CLI to continue.
elapsedTime,
currentLoadingPhrase,
historyRemountKey,
activeHooks,
messageQueue,
queueErrorMessage,
showAutoAcceptIndicator,