feat(ui): use Tab to switch focus between shell and input (#14332)

This commit is contained in:
Jacob Richman
2026-01-12 15:30:12 -08:00
committed by GitHub
parent 2e8c6cfdbb
commit ca6786a28b
11 changed files with 180 additions and 114 deletions

View File

@@ -15,12 +15,14 @@ export interface UseAutoAcceptIndicatorArgs {
config: Config;
addItem?: (item: HistoryItemWithoutId, timestamp: number) => void;
onApprovalModeChange?: (mode: ApprovalMode) => void;
isActive?: boolean;
}
export function useAutoAcceptIndicator({
config,
addItem,
onApprovalModeChange,
isActive = true,
}: UseAutoAcceptIndicatorArgs): ApprovalMode {
const currentConfigValue = config.getApprovalMode();
const [showAutoAcceptIndicator, setShowAutoAcceptIndicator] =
@@ -82,7 +84,7 @@ export function useAutoAcceptIndicator({
}
}
},
{ isActive: true },
{ isActive },
);
return showAutoAcceptIndicator;

View File

@@ -12,7 +12,7 @@ import { useInactivityTimer } from './useInactivityTimer.js';
export const PHRASE_CHANGE_INTERVAL_MS = 15000;
export const INTERACTIVE_SHELL_WAITING_PHRASE =
'Interactive shell awaiting input... press Ctrl+f to focus shell';
'Interactive shell awaiting input... press tab to focus shell';
/**
* Custom hook to manage cycling through loading phrases.