MCPcopy Create free account
hub / github.com/codeaashu/claude-code / handleHistoryDown

Function handleHistoryDown

src/components/PromptInput/PromptInput.tsx:944–967  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

942 onHistoryUp();
943 }
944 function handleHistoryDown() {
945 if (suggestions.length > 1) {
946 return;
947 }
948
949 // Only navigate history/footer when cursor is on the last line.
950 // In multiline inputs, down arrow should move the cursor (handled by TextInput)
951 // and only trigger navigation when at the bottom of the input.
952 if (!isCursorOnLastLine) {
953 return;
954 }
955
956 // At bottom of history → enter footer at first visible pill
957 if (onHistoryDown() && footerItems.length > 0) {
958 const first = footerItems[0]!;
959 selectFooterItem(first);
960 if (first === 'tasks' && !getGlobalConfig().hasSeenTasksHint) {
961 saveGlobalConfig(c => c.hasSeenTasksHint ? c : {
962 ...c,
963 hasSeenTasksHint: true
964 });
965 }
966 }
967 }
968
969 // Create a suggestions state directly - we'll sync it with useTypeahead later
970 const [suggestionsState, setSuggestionsStateRaw] = useState<{

Callers

nothing calls this directly

Calls 3

selectFooterItemFunction · 0.85
getGlobalConfigFunction · 0.85
saveGlobalConfigFunction · 0.85

Tested by

no test coverage detected