Skip to content

Commit

Permalink
Allow use of up and down arrow in chat input
Browse files Browse the repository at this point in the history
  • Loading branch information
brichet committed Feb 7, 2025
1 parent ff01015 commit f006e25
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/jupyter-chat/src/components/chat-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ export function ChatInput(props: ChatInput.IProps): JSX.Element {
}, [input]);

function handleKeyDown(event: React.KeyboardEvent<HTMLInputElement>) {
if (['ArrowDown', 'ArrowUp'].includes(event.key) && !open) {
event.stopPropagation();
return;
}

if (event.key !== 'Enter') {
return;
}
Expand Down

0 comments on commit f006e25

Please sign in to comment.