File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
packages/jupyter-chat/src/components Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import CloseIcon from '@mui/icons-material/Close';
77import { Box , Button , Tooltip } from '@mui/material' ;
88import React from 'react' ;
99import { PathExt } from '@jupyterlab/coreutils' ;
10+ import { UUID } from '@lumino/coreutils' ;
1011
1112import { useChatContext } from '../context' ;
1213import { IAttachment } from '../types' ;
@@ -65,7 +66,7 @@ export function AttachmentPreviewList(props: AttachmentsProps): JSX.Element {
6566 >
6667 { props . attachments . map ( attachment => (
6768 < AttachmentPreview
68- key = { attachment . value }
69+ key = { ` ${ PathExt . basename ( attachment . value ) } - ${ UUID . uuid4 ( ) } ` }
6970 { ...props }
7071 attachment = { attachment }
7172 />
Original file line number Diff line number Diff line change @@ -46,7 +46,6 @@ export function ChatInput(props: ChatInput.IProps): JSX.Element {
4646 const [ toolbarElements , setToolbarElements ] = useState <
4747 InputToolbarRegistry . IToolbarItem [ ]
4848 > ( [ ] ) ;
49- const [ isFocused , setIsFocused ] = useState < boolean > ( false ) ;
5049 const [ writers , setWriters ] = useState < IChatModel . IWriter [ ] > ( [ ] ) ;
5150
5251 /**
@@ -214,9 +213,7 @@ export function ChatInput(props: ChatInput.IProps): JSX.Element {
214213 < Box
215214 sx = { {
216215 border : '1px solid' ,
217- borderColor : isFocused
218- ? 'var(--jp-brand-color1)'
219- : 'var(--jp-border-color1)' ,
216+ borderColor : 'var(--jp-border-color1)' ,
220217 borderRadius : 2 ,
221218 transition : 'border-color 0.2s ease' ,
222219 display : 'flex' ,
@@ -262,8 +259,6 @@ export function ChatInput(props: ChatInput.IProps): JSX.Element {
262259 onKeyDown = { handleKeyDown }
263260 placeholder = "Type a chat message, @ to mention..."
264261 inputRef = { inputRef }
265- onFocus = { ( ) => setIsFocused ( true ) }
266- onBlur = { ( ) => setIsFocused ( false ) }
267262 onSelect = { ( ) =>
268263 ( model . cursorIndex = inputRef . current ?. selectionStart ?? null )
269264 }
You can’t perform that action at this time.
0 commit comments