Skip to content

Commit

Permalink
Limit chat input height to 20 lines (#877)
Browse files Browse the repository at this point in the history
* Limit the number of displayed rows in chat input to 20

* affix send button to bottom of chat input

---------

Co-authored-by: David L. Qiu <[email protected]>
  • Loading branch information
krassowski and dlqqq authored Jul 8, 2024
1 parent 43a0e8f commit fdb8456
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/jupyter-ai/src/components/chat-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,17 @@ export function ChatInput(props: ChatInputProps): JSX.Element {
{...params}
fullWidth
variant="outlined"
maxRows={20}
multiline
placeholder="Ask Jupyternaut"
onKeyDown={handleKeyDown}
InputProps={{
...params.InputProps,
endAdornment: (
<InputAdornment position="end">
<InputAdornment
position="end"
sx={{ height: 'unset', alignSelf: 'flex-end' }}
>
<SendButton {...sendButtonProps} />
</InputAdornment>
)
Expand Down

0 comments on commit fdb8456

Please sign in to comment.