opencoder
Version:
8 lines (7 loc) • 336 B
TypeScript
export declare function useArrowKeyHistory(onSetInput: (value: string, mode: "bash" | "prompt") => void, currentInput: string): {
historyIndex: number;
setHistoryIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
onHistoryUp: () => void;
onHistoryDown: () => void;
resetHistory: () => void;
};