feat(cli): suppress shell inactivity indicators when cursor is hidden

This commit is contained in:
Keith Guerin
2026-03-27 20:59:00 -07:00
parent 5a39e69164
commit bc17679db7
7 changed files with 58 additions and 6 deletions
@@ -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;