mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-08-09 00:16:57 -07:00
feat(cli): suppress shell inactivity indicators when cursor is hidden
This commit is contained in:
@@ -21,6 +21,7 @@ interface ShellInactivityStatusProps {
|
||||
pendingToolCalls: TrackedToolCall[];
|
||||
embeddedShellFocused: boolean;
|
||||
isInteractiveShellEnabled: boolean;
|
||||
isCursorHidden?: boolean;
|
||||
}
|
||||
|
||||
export type InactivityStatus = 'none' | 'action_required' | 'silent_working';
|
||||
@@ -41,6 +42,7 @@ export const useShellInactivityStatus = ({
|
||||
pendingToolCalls,
|
||||
embeddedShellFocused,
|
||||
isInteractiveShellEnabled,
|
||||
isCursorHidden,
|
||||
}: ShellInactivityStatusProps): ShellInactivityStatus => {
|
||||
const { operationStartTime, isRedirectionActive } = useTurnActivityMonitor(
|
||||
streamingState,
|
||||
@@ -49,7 +51,10 @@ export const useShellInactivityStatus = ({
|
||||
);
|
||||
|
||||
const isAwaitingFocus =
|
||||
!!activePtyId && !embeddedShellFocused && isInteractiveShellEnabled;
|
||||
!!activePtyId &&
|
||||
!embeddedShellFocused &&
|
||||
isInteractiveShellEnabled &&
|
||||
!isCursorHidden;
|
||||
|
||||
// Derive whether output was produced by comparing the last output time to when the operation started.
|
||||
const hasProducedOutput = lastOutputTime > operationStartTime;
|
||||
|
||||
Reference in New Issue
Block a user